Skip to content

Instantly share code, notes, and snippets.

@reikje
Created February 2, 2012 14:58
Show Gist options
  • Select an option

  • Save reikje/1723841 to your computer and use it in GitHub Desktop.

Select an option

Save reikje/1723841 to your computer and use it in GitHub Desktop.
patterntesting
@RunWith(ParallelRunner.class)
public class Base64EncoderTest {
@Broken(till = "01-03-2012", why = "Fix needed to go out in a hurry, will fix later", user = "reik")
@Test
public void testValidateCollectibleCanBeGivenBasedOnClicks() {
// tests if both equals and hashcode have been overwritten
ObjectTester.assertEquals(x, y);
// tests if a Serializable is correctly implemented
SerializableTester.assertSerialization(x);
// compare content of two files
FileTester.assertContentEquals(file1, file2)
// same as above for InputStream and Reader
IOTester.assertContentEquals(in1, in2)
// assert enough memory
RuntimeTester.assertFreeMemory(required)
@RunTestOn(osName = "Windows")
@Test
public void testCryptBillsFile() throws IOException {
File tempFile = new File("C:/Temp", "file.txt");
checkCrypt(tempFile);
}
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] Parent Project .............................. SUCCESS [2.275s]
[INFO] Unit Testing Utilities ...................... SUCCESS [1.813s]
[INFO] XML Parsing ................................. SUCCESS [7.313s]
[INFO] Protobuf Generator .......................... SUCCESS [2.970s]
[INFO] Domain Specific Code ........................ SUCCESS [16.092s]
[INFO] Web Application ............................. SUCCESS [47.017s]
[INFO] Debug Tool .................................. SUCCESS [2.705s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] ------------------------------------------------------------------------
[INFO] Parent Project .............................. SUCCESS [3.800s]
[INFO] Unit Testing Utilities ...................... SUCCESS [4.781s]
[INFO] XML Parsing ................................. SUCCESS [12.239s]
[INFO] Protobuf Generator .......................... SUCCESS [6.199s]
[INFO] Domain Specific Code ........................ SUCCESS [21.804s]
[INFO] Web Application ............................. SUCCESS [1:05.495s]
[INFO] Debug Tool .................................. SUCCESS [7.753s]
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESSFUL
[INFO] ------------------------------------------------------------------------
@RunWith(ParallelProxyRunner.class)
@DelegateTo(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "/testApplicationContext.xml")
public class TransactionSupportTest {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment