public void ReturnsProvidedEvents_WhenCreatedByFactoryMethod() { var testee = EventHistory.Create(new ValueEvent(11), new ValueEvent(22)); testee.Should().HaveCount(2); testee.First().As <ValueEvent>().Value.Should().Be(11); testee.Last().As <ValueEvent>().Value.Should().Be(22); }
public void CanLoadFromEventHistory() { var eventHistory = EventHistory.Create(new ValueEvent(11), new ValueEvent(22), new ValueEvent(33)); this.testee.LoadFromEventHistory(eventHistory); this.testee.Value.Should().Be(33); }
public void CanCreateAnEmptyEventHistoryByFactoryMethod() { var testee = EventHistory.Create(); testee.IsEmpty.Should().BeTrue(); }