I am (beginner, so go easy on me), trying to write unit tests for some of the custom functions I wrote on an appium test framework. public class BasePageNewTest
I am using IntellIj IDEA, when I try to debug into a mockito spied object, it gave me error "source code does not match the bytecode". can anyone help?
Trying to test my web tier (spring boot, spring mvc) with junit5 and mockito. All other tests on http methods (get, put, ...) are working fine but the update. F
class A { public static int f1() { return 1; } public static int f2() { return A.f1(); } } class ATest { @Test void testF2()
class A { public static int f1() { return 1; } public static int f2() { return A.f1(); } } class ATest { @Test void testF2()
I'm trying to modify existing test of kotlin+springboot project. Mockito.`when`(serviceA.getData(anyString())).thenReturn(data)// existing mocking Mockito.`when
I need to mock some class that contains @PostConstruct method, but I get NullPointerException inside @PostConstruct method. My code looks like the following: @S
Trying to update my project from Java 11 to Java 17 and got an unexpected error from Mockito in a specific test. mock(java.util.Random.class); Throws Feb 04, 2
object Abc { method1(param1,param2):Future[Option[String]] = { //some work } } We are using method1 somewhere and need to stub method1 how can
I am recently writing a JUnit test and I acknowledged that Mockito either needs all Raw values or using all Matchers but I find the following case still fails w
I am trying to set up unit tests for my application. But I am facing an issue with Segment This is my test class: @RunWith(RobolectricTestRunner::class) @Config
My Repository layer is returning list object, But in my service layer i am filtering out all other and return a single Object. when i try to create test cases i
I'm trying to write a Java unit test but not sure where I'm going wrong. Likely a lack of understanding. This is my test so far: @Test public void getURL() thro
Suppose my class is: open class TestThis{ @Autowired private var myService : MyService? = null fun doMyFunction(){ val result = myService.d
I simply try to test the following part of my service method: if (isDeleted) { LoggingUtils.info("Deleted. ingredientUuuid: {}", ingredient.getUuid()); } I
My respected java developer friends. i am trying test and cover the catch block of clone method. I have wasted one week but didn't find any solution to cover c
I'm using Spring Boot and in a unit test, I'm trying to mock the Files.delete(myFile.toPath()) method. To do so I'm trying to use the Mockito.mockStatic() metho
I wrote a few unit and widget tests for my Flutter app. They all pass when called from the testing window out of VSCode: But when I call flutter test from the
I am developing a Spring Boot application. For my regular service class unit tests, I am able to extend my test class with MockitoExtension, and the mocks are s
I am learning more about testing and i want to use Mockito Package and Build Runner Packate then i have my class Cat inside lib/models/cat.dart then i have my