use of com.iluwatar.databus.data.StartingData in project java-design-patterns by iluwatar.
the class StatusMemberTest method statusRecordsTheStartTime.
@Test
public void statusRecordsTheStartTime() {
// given
final LocalDateTime startTime = LocalDateTime.of(2017, Month.APRIL, 1, 19, 9);
final StartingData startingData = new StartingData(startTime);
final StatusMember statusMember = new StatusMember(1);
// when
statusMember.accept(startingData);
// then
assertEquals(startTime, statusMember.getStarted());
}
use of com.iluwatar.databus.data.StartingData in project java-design-patterns by iluwatar.
the class MessageCollectorMemberTest method collectIgnoresMessageFromOtherDataTypes.
@Test
public void collectIgnoresMessageFromOtherDataTypes() {
// given
final StartingData startingData = new StartingData(LocalDateTime.now());
final MessageCollectorMember collector = new MessageCollectorMember("collector");
// when
collector.accept(startingData);
// then
assertEquals(0, collector.getMessages().size());
}
Aggregations