Esempio n. 1
0
        public void DeleteValidBooking()
        {
            // inserindo um registro válido para após apagar

            BookController bc = new BookController();
            string dummyPost = "{bookReference: \"abc12\", car:{category: 0, model: 1, year: 2015}, driver:{age: 28, firstName: \"John\", lastName: \"Doe\"}, dropoffDate: \"2016-02-20T00:00:00-02:00\", hasAgeExtraFee: false, pickupDate: \"2016-02-07T00:00:00-02:00\"}";
            bc.Post(dummyPost);

            Assert.True(bc.Delete("abc12").StatusCode == HttpStatusCode.OK);
        }
Esempio n. 2
0
 public void DeleteInvalidBooking()
 {
     BookController bc = new BookController();
     Assert.True(bc.Delete("randomnumberreferencethatprobablydontexist").StatusCode == HttpStatusCode.BadRequest);
 }