public void WritePriceOnDisconnectedServiceTest()
        {
            var wrapper = new CatWebserviceWrapper(Service);
            PriceWebsiteDescription price = TestHelper.GetPriceWebsiteDescription();
            Assert.AreEqual(WebserviceWrapperState.Disconnected, wrapper.WebserviceState);

            IWebserviceResult webserviceResult = wrapper.WritePrice(price);

            Assert.IsTrue(webserviceResult.HasErrors);
            Assert.IsNotNull(webserviceResult.RequestInfo);
        }
 public void WebserviceResultExceptionTest()
 {
     var wrapper = new CatWebserviceWrapper(Service);
     IWebserviceResult result = wrapper.WritePrice(TestHelper.GetPriceWebsiteDescription());
     Assert.IsTrue(result.HasErrors);
     Assert.IsNotNull(result.ServiceMessage, result.ServiceMessage);
 }
        public void WritePriceForOnlineProductTest()
        {
            var wrapper = new CatWebserviceWrapper(Service);
            PriceWebsiteDescription price = TestHelper.GetPriceWebsiteDescription();

            wrapper.Connect();

            IWebserviceResult webserviceResult = wrapper.WritePrice(price);
            Assert.IsFalse(webserviceResult.HasErrors);
            Assert.IsNotNull(webserviceResult.RequestInfo);
        }
        public void DeleteAllPricesForValor()
        {
            PriceWebsiteDescription price = TestHelper.GetPriceWebsiteDescription();

            var wrapper = new CatWebserviceWrapper(Service);
            wrapper.Connect();

            IWebserviceResult webserviceResult = wrapper.WritePrice(price);
            Assert.IsFalse(webserviceResult.HasErrors, webserviceResult.ServiceMessage);
            wrapper.DeleteAllPrices(price.Valor);
        }