-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements after review comments incorporated
- Loading branch information
1 parent
f538bea
commit 72825f0
Showing
13 changed files
with
150 additions
and
26 deletions.
There are no files selected for viewing
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
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
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
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
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
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
47 changes: 47 additions & 0 deletions
47
src/test/java/com/wcc/platform/domain/platform/EventSectionTest.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package com.wcc.platform.domain.platform; | ||
|
||
import static com.wcc.platform.factories.SetupEventFactories.createEventSection; | ||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertNotEquals; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
import com.wcc.platform.domain.cms.attributes.ProgramType; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
|
||
/** Test class for the class {@link EventSection}. */ | ||
class EventSectionTest { | ||
|
||
EventSection testEventSection; | ||
|
||
@BeforeEach | ||
void setup() { | ||
testEventSection = createEventSection(); | ||
} | ||
|
||
@Test | ||
void testEquals() { | ||
assertEquals(testEventSection, createEventSection(ProgramType.BOOK_CLUB)); | ||
} | ||
|
||
@Test | ||
void testNotEquals() { | ||
assertNotEquals(testEventSection, createEventSection(ProgramType.TECH_TALK)); | ||
} | ||
|
||
@Test | ||
void testHashCode() { | ||
assertEquals(testEventSection.hashCode(), createEventSection(ProgramType.BOOK_CLUB).hashCode()); | ||
} | ||
|
||
@Test | ||
void testHashCodeNotEquals() { | ||
assertNotEquals( | ||
testEventSection.hashCode(), createEventSection(ProgramType.TECH_TALK).hashCode()); | ||
} | ||
|
||
@Test | ||
void testToString() { | ||
assertTrue(testEventSection.toString().contains(ProgramType.BOOK_CLUB.toString())); | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
src/test/java/com/wcc/platform/domain/platform/EventTest.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.wcc.platform.domain.platform; | ||
|
||
import static com.wcc.platform.factories.SetupEventFactories.createEventTest; | ||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertNotEquals; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
import com.wcc.platform.domain.cms.attributes.ProgramType; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
|
||
/** Test class for the class {@link Event}. */ | ||
class EventTest { | ||
|
||
Event testEvent; | ||
|
||
@BeforeEach | ||
void setup() { | ||
testEvent = createEventTest(); | ||
} | ||
|
||
@Test | ||
void testEqual() { | ||
assertEquals(testEvent, createEventTest(ProgramType.BOOK_CLUB)); | ||
} | ||
|
||
@Test | ||
void testNotEqual() { | ||
assertNotEquals(testEvent, createEventTest(ProgramType.TECH_TALK)); | ||
assertNotEquals(testEvent, createEventTest(ProgramType.WRITING_CLUB)); | ||
assertNotEquals( | ||
createEventTest(ProgramType.WRITING_CLUB), createEventTest(ProgramType.TECH_TALK)); | ||
} | ||
|
||
@Test | ||
void testHashCode() { | ||
assertEquals(testEvent.hashCode(), createEventTest(ProgramType.BOOK_CLUB).hashCode()); | ||
} | ||
|
||
@Test | ||
void testHashCodeNotEquals() { | ||
assertNotEquals(testEvent.hashCode(), createEventTest(ProgramType.WRITING_CLUB).hashCode()); | ||
} | ||
|
||
@Test | ||
void testToString() { | ||
assertTrue(testEvent.toString().contains(ProgramType.BOOK_CLUB.toString())); | ||
assertTrue(testEvent.toString().contains(ProgramType.BOOK_CLUB.toString())); | ||
} | ||
} |
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
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
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
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
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