Example #1
0
        public void IsNotDeletedPositiveTest()
        {
            var spec      = new IsNotDeletedSpecification <CompetitionAggregate>();
            var isDeleted = spec.IsSatisfiedBy(new CompetitionAggregate(CompetitionId.New, SnapshotNeverStrategy.Default));

            isDeleted.Should().BeTrue();
        }
Example #2
0
        public void IsNotDeletedNegativeTest()
        {
            var spec        = new IsNotDeletedSpecification <CompetitionAggregate>();
            var competition = new CompetitionAggregate(CompetitionId.New, SnapshotNeverStrategy.Default);

            competition.ApplyEvents(ToDomainEvents(competition.Id, new CompetitionRegisteredEvent("user", "name"), new CompetitionDeletedEvent(new EntryId[0].AsEnumerable())));
            var isNew = spec.IsSatisfiedBy(competition);

            isNew.Should().BeFalse();
        }