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);
        }
示例#2
0
 private void PopulateRepository(int count)
 {
     for (int i = 0; i < count; i++)
     {
         _repository.Insert(new Pdv(SampleValidPdvsRequests[i]));
     }
 }
示例#3
0
        public PdvResponse Create(PdvRequest request)
        {
            _validator.ValidateAndThrow(request);
            //TODO: Implementar handler validação

            Pdv pdv = _repository.Insert(new Pdv(request));

            return(new PdvResponse(pdv));
        }