Skip to main content

All Questions

Tagged with
0 votes
0 answers
18 views

ParameterizedTest JUNIT5 with suspend functions

I'm trying to clean a little bit my code and when testing my datasource I'm repeating a lot the test that returns connection and service error, and I'd like to have a bunch of code that tests ...
StuartDTO's user avatar
  • 881
0 votes
0 answers
29 views

Django Internationalization test error:Couldn't retrieve redirection page

I wrote a blog project in Django,in some pages i used loginrequierdmixin to make sure user is loged in but in test i got error test: def test_get_profile_unauthenticated(self): response = ...
ParsaM's user avatar
  • 1
0 votes
0 answers
12 views

Testing provider in flutter which depends on Firebase

I am trying the following test: @GenerateMocks([Tour]) void main() { group('TripProvider', () { test('add Trip', () async { final mockTrip = MockTour(); TripProvider provider = ...
Arnob's user avatar
  • 507
0 votes
1 answer
28 views

How to test Amazon Athena queries

I have a rather complicated Athena query, which I would like to test on a local machine without connecting to Athena. I specified some mock data for testing purposes, and I was hoping that I could use ...
Amuoeba's user avatar
  • 714
1 vote
1 answer
52 views

How can I test that the PHP code under test calls the proper method on a trait?

Edit: After reading one of the comments, I realized I misspoke pretty badly in the original post, I've made some edits to clarify. Essentially, I need to check the results but am struggling with that ...
jrgilman's user avatar
  • 472
-1 votes
1 answer
30 views

XCode tests issue: 'any Protocol' does not conform to expected type 'Protocol' insert 'as! Protocol'

Started adding tests to supplementary objects Tested class code: class TokenAdapter { private let tokenProvider: TokenProviderProtocol! private let session: SessionProtocol! // MARK: - Init ...
Viktor's user avatar
  • 1,107
0 votes
1 answer
27 views

Testing Value Objects in DDD, "Implementing Domain Driven Design"

In the book "Implementing Domain Driven Design" of Vaughn Vernon, in the Testing of Value Objects section, the author talks about how we can use just shallow copy instead of deep copy to ...
Khoa Phạm's user avatar
-3 votes
1 answer
38 views

Go: test fails when expected value is the same as got value [closed]

I'm learning to test http endpoints in Go with the httptest library and my test is failingeven though by the result it should pass. The function being tested: func testHandler(w http.ResponseWriter, r ...
Anacardo's user avatar
3 votes
2 answers
80 views

Can you test whether a function is actually running Asynchronously?

I'm working on a ASP.NET Web Api project to learn the framework and the testing for it and I was wondering if you could test that Asynchronous methods are actually running Asynchronously (or are they ...
White Head Ice Prince's user avatar
-1 votes
0 answers
76 views

How to test a server action function?

I have a nextjs server action that uses mssql for node to connect with the database. The following is pizza.actions.ts: export async function get_pizza_id(pizza_name: string) { try { if(!...
Sid's user avatar
  • 47
1 vote
1 answer
59 views

How to unit test for multipart.Form

I need to write tests for that function: func Parse(f *multipart.Form) ([]Person, error) It's important to say, that multipart.Form.Value is not just key:value, thats more complicated json, simple ...
kirin's user avatar
  • 31
1 vote
1 answer
117 views

TS2305: Module '@angular/core/testing' has no exported member async

I updated angular version from 17 to 18 and because of which some modules are no longer supporter especially in spec.ts files while importing them. Like async from @angular/core/testing and **...
Nixon Darius's user avatar
1 vote
2 answers
48 views

How can I write a test with Xunit that accepts an enum as parameter?

I try to write a test that looks like this: private static readonly IEnumerable<MyEnumType> ListOfEnumValues = Enum.GetValues(typeof(MyEnumType)).Cast<DocumentType>(); private static ...
MrMaavin's user avatar
  • 1,719
0 votes
1 answer
21 views

Can I use built-in Microsoft DI in unit tests for init objects?

in unit tests for init and create the objects I would like to use buit-in Microsoft DI, is it good practice?
Ershad Raoufi's user avatar
0 votes
0 answers
9 views

Testing on Loom testnet

I try to deploy it on Loom testnet: truffle.js test --network loom_testnet **This is my configtion Loom testnet in config-truffle.js : ** enter image description here AND THIS IS I GOT THIS ERROR ...
 Kim Thuy FX17597's user avatar

15 30 50 per page
1
2 3 4 5
443