public void ApoGroupShouldReturnNullWhenIdIsNotExistInDatabase() { var service = new ApoGroupService(_apoGroupRepository, _apoDivisionRepository); var sut = service.GetById(100); Assert.Null(sut); }
public void ApoGroupReturnCorrectObjectWhenAssignCorrectId() { var service = new ApoGroupService(_apoGroupRepository, _apoDivisionRepository); var sut = service.GetById(10); var compareObj = Mapper.Map <ApoGroupDto>(_apoGroup.Single(x => x.Id == 10)); compareObj.DivisionName = _apoDivision.Single(x => x.Id == compareObj.DivisionId).Name; AssertObjects.PropertyValuesAreEquals(sut, compareObj); }