public void UpdateManufacturer_creates_new_manufacturer_and_returns_ok()
        {
            Manufacturer manufacturer = new AnonymousManufacturerBuilder().build();

            string result = WebMethods.ManufacturerMethods.UpdateManufacturer(manufacturer);

            result = XElement.Parse(result).Value;

            Assert.IsTrue(result == "ok",
                          string.Format("Manufacturer with id {0} could not be created/updated. Unexpected return value: {1}", manufacturer.Id, result));
        }
        public void UpdateManufacturer_with_values_saves_all_data_correctly()
        {
            Manufacturer manufacturer = new AnonymousManufacturerBuilder().build();

            //save the instrument to the webshop
            string result = WebMethods.ManufacturerMethods.UpdateManufacturer(manufacturer);

            result = XElement.Parse(result).Value;

            Assert.IsTrue(result == "ok",
                          string.Format("Manufacturer with id {0} could not be created/updated. Unexpected return value was: {1}", manufacturer.Id, result));

            //retrieve the instrument from the webshop
            string       errorMsg;
            Manufacturer manufacturerFromWS = WebMethods.ManufacturerMethods.GetManufacturerById(manufacturer.Id, out errorMsg);

            //compare all values
            Assert.AreEqual(manufacturer.Id, manufacturerFromWS.Id, "The field comparison for field \"id\" failed.");
            Assert.AreEqual(manufacturer.Name, manufacturerFromWS.Name, "The field comparison for field \"name\" failed.");
            Assert.AreEqual(manufacturer.Test, manufacturerFromWS.Test, "The field comparison for field \"test\" failed.");
            Assert.AreEqual(manufacturer.CreatedDttm, manufacturerFromWS.CreatedDttm, "The field comparison for field \"created\" failed.");
            Assert.AreEqual(manufacturer.UpdatedDttm, manufacturerFromWS.UpdatedDttm, "The field comparison for field \"updated\" failed.");
            Assert.AreEqual(manufacturer.DeletedDttm, manufacturerFromWS.DeletedDttm, "The field comparison for field \"deleted\" failed.");
        }