Created
April 30, 2020 18:54
-
-
Save TsuyoshiUshio/9d2ea4678c6360322abfe1e12b9ed698 to your computer and use it in GitHub Desktop.
jMockit sample
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()); | |
assertEquals("bar", data2.getName()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment