public void Simple_Status_Race() { IElectionRepository electionRepository = Substitute.For <IElectionRepository>(); var f = new Fixture(); var election = f.Create <Election>(); var race = Create(election.GetMasterDataRef()); electionRepository.GetById(Arg.Any <Guid>()).Returns(election); var raceRepository = new RaceRepository(ContextConnection(), electionRepository); raceRepository.Save(race); raceRepository.SetInactive(race); var inactive = raceRepository.GetById(race.Id); Assert.That(inactive.Status == EntityStatus.Inactive); raceRepository.SetActive(race); var active = raceRepository.GetById(race.Id); Assert.That(active.Status == EntityStatus.Active); raceRepository.SetAsDeleted(race); var deleted = raceRepository.GetById(race.Id); Assert.That(deleted.Status == EntityStatus.Deleted); }