Esempio n. 1
0
        //[Test]
        public void TestBeverageDelete()
        {
            var beverage = new Beverage
            {
                AlcoholPercent  = 7.5M,
                Description     = "Test Beverage",
                ManufacturerId  = 1,
                Name            = "Awesome Brew",
                BeverageTypeId  = 1,
                BeverageStyleId = 1,
                Volume          = 375
            };

            beverage.Id = BeverageTestHelper.AddBeverage(beverage);
            Assert.IsTrue(beverage.Id > 0);

            // Act
            HttpResponseMessage response = HttpRequestHelper.Delete(this.serviceEndpoint, String.Format("api/beverages/{0}", beverage.Id));

            // Assert
            Assert.AreEqual(HttpStatusCode.OK, response.StatusCode);
        }