Last active
August 29, 2015 14:05
-
-
Save chaudum/96b8b5b58444fc569ef8 to your computer and use it in GitHub Desktop.
JUnit4 Testcase
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
package io.crate | |
public class AwesomeCrateClass { | |
public Boolean myMethod(Boolean value) { | |
return !value; | |
} | |
} |
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
import org.junit.Test; | |
import static org.junit.Assert.*; | |
public class AwesomeCrateClassTest { | |
final static AwesomeCrateClass myClass = new AwesomeCrateClass(); | |
@Test | |
public void testMyMethod() throws Exception { | |
Boolean inputValue = true; | |
Boolean outputValue = myClass.myMethod(true); | |
assertTrue(inputValue == false); | |
assertEquals(inputValue, false); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment