python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Simple JUnit test fails
I want to learn how to write JUnit tests and I fail completely.
This is my test:
@Test
public void testGetAllCustomers() {
// given
List<Customer> customerList = new Arra...
FrozenTree
Votes: 0
Answers: 2
I m trying to mock the .header but it does not work, does anyone has an idea?
i tried to mock the header with when(requestHeadersSpec.header(notNull(), notNull())).thenReturn(requestHeadersSpec);, or something similar but i does not work, does anyone has an idea?
return defa...
cornelF
Votes: 0
Answers: 1
Flutter Mockito Test StreamSubscription onError
I am trying to test a cubit which subscribes to a firebaseAuth listener that is prone to fail and presumably call "onError" on the subscriber.
I am struggling to mock the exception as a subs...
Jacobo Koenig
Votes: 0
Answers: 1
How can I test a method and to mock another method that are in the same class in Flutter
Description:
I have already tested methodA() and methodB() so I can be sure that they are covered.
What are the ways to test methodToBeTested() by mocking methodA() and methodB() that are in the same ...
DenFav
Votes: 0
Answers: 1