public void GivenACode_WhenADocTypeIsRequested_ThenADocTypeIsReturned() { _docTypeRepository.Setup(a => a.GetDocType(It.IsAny <string>())).Returns(new DocType()); DocType doctpye = _docTypeService.GetDocType(It.IsAny <string>()); doctpye.Should().NotBeNull(); }
public void WhenIUpdateADocType_ThenTheDocTypeIsUpdated() { _docTypeRepository.Create(_docType1); DocType docType = _docTypeRepository.Entities.Where(p => p.Code == "code").FirstOrDefault(); _docTypeRepository.Update(docType.Id, "new code", "description 1"); docType = _docTypeRepository.Entities.Where(p => p.Code == "new code").FirstOrDefault(); docType.Should().NotBeNull(); }