public void GetByIdOriginalReturnsNullIfAssignmentWithIdNotFound() { BaseServiceTests.Initialize(); var id = "NoSuchId"; var repository = new DbRepository <Assignment>(this.dbFixture.dbContext); var service = new AssignmentService(repository); var result = service.GetByIdOriginal(id); Assert.Null(result); }
public void GetByIdOriginalGetsAssignmentWithTheGivenId() { BaseServiceTests.Initialize(); var id = this.dbFixture.dbContext.Assignments .Where(l => l.IsDeleted == false).Select(l => l.Id).First(); var repository = new DbRepository <Assignment>(this.dbFixture.dbContext); var service = new AssignmentService(repository); var result = service.GetByIdOriginal(id); Assert.Equal(id, result.Id); }