1. Marcin Grzejszczak
  2. Too Much Coding

Commits

Marcin Grzejszczak  committed 249e9a5

Fixed wrong unit tests

  • Participants
  • Parent commits 36becc0
  • Branches default

Comments (0)

Files changed (3)

File Unit Testing - Matchers/src/test/java/pl/grzejszczak/marcin/junit/matchers/builder/SomeBigPojoBuilderNoMatchersAndNoRefactoringTest.java

View file
  • Ignore whitespace
     @Before
     public void setUp() {
         objectUnderTest = new SomeBigPojoBuilder();
+
     }
 
     @Test
     @Test(expected = AssertionError.class)
     public void testCreateSomeBigPojoWithBuilderWrongFields() throws Exception {
         SomeBigPojo someBigPojo = objectUnderTest
-                .setBooleanField1(true)
+                .setStringField1("too long")
                 .createSomeBigPojoWithBuilder();
 
         isPojoProperlyBuilt(someBigPojo);

File Unit Testing - Matchers/src/test/java/pl/grzejszczak/marcin/junit/matchers/builder/SomeBigPojoBuilderNoMatchersTest.java

View file
  • Ignore whitespace
     @Test(expected = AssertionError.class)
     public void testCreateSomeBigPojoWithBuilderWrongFields() throws Exception {
         SomeBigPojo someBigPojo = objectUnderTest
-                .setBooleanField1(true)
+                .setStringField1("too long")
                 .createSomeBigPojoWithBuilder();
 
         isPojoProperlyBuilt(someBigPojo);

File Unit Testing - Matchers/src/test/java/pl/grzejszczak/marcin/junit/matchers/builder/SomeBigPojoBuilderTest.java

View file
  • Ignore whitespace
     @Test(expected = AssertionError.class)
     public void testCreateSomeBigPojoWithBuilderWrongFields() throws Exception {
         SomeBigPojo someBigPojo = objectUnderTest
-                .setBooleanField1(true)
+                .setStringField1("Too long")
                 .createSomeBigPojoWithBuilder();
 
         assertThat(someBigPojo, isPojoProperlyBuilt());