コード例 #1
0
        public void Update_validResponse_test()
        {
            var now  = DateTime.Now;
            var html = "<p>test</p>";

            bannerService.CreateBanner(0, "<div>divvvv</div>");
            var response = bannerController.Put(0, html);

            Assert.Equal(0, response.Id);
            Assert.Equal(html, response.Html);
            Assert.True(response.Created.Value.Ticks - now.Ticks >= -tenMilisecondsTicks);
            Assert.True(response.Modified.Value.Ticks - now.Ticks >= -tenMilisecondsTicks);
            Assert.NotEqual(response.Created, response.Modified);
        }