Created
April 30, 2020 19:00
-
-
Save TsuyoshiUshio/2b7d8853661c0e518c7382a1f2fca747 to your computer and use it in GitHub Desktop.
jMockit sample (Missing Invocation)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SampleTest { | |
@Test | |
public void executeSample( | |
@Mocked final TypedData data1, | |
@Mocked final TypedData data2 | |
) throws Exception { | |
new Expectations() {{ | |
data1.getName(); result = "foo"; | |
data2.getName(); result = "bar"; | |
}}; | |
assertEquals("foo", data1.getName()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment