public void Insert_ValidPdv_ReturnsPdv() { Pdv validPdv = NewValidPdv; Pdv response = _repository.Insert(validPdv); Assert.IsNotNull(response); Assert.AreSame(typeof(Pdv), response.GetType()); Assert.AreEqual(validPdv.TradingName, response.TradingName); Assert.AreEqual(validPdv.OwnerName, response.OwnerName); Assert.AreEqual(validPdv.Document, response.Document); Assert.AreEqual(validPdv.CoverageArea, response.CoverageArea); Assert.AreEqual(validPdv.Address, response.Address); }
private void PopulateRepository(int count) { for (int i = 0; i < count; i++) { _repository.Insert(new Pdv(SampleValidPdvsRequests[i])); } }
public PdvResponse Create(PdvRequest request) { _validator.ValidateAndThrow(request); //TODO: Implementar handler validação Pdv pdv = _repository.Insert(new Pdv(request)); return(new PdvResponse(pdv)); }