コード例 #1
0
 public void DuplicateRuleShouldThrow()
 {
     Assert.Throws <ArgumentException>(() =>
     {
         _responseWithObject
         .TestBody("should blow up again", x => x.product[1].name != "")
         .TestBody("should blow up again", x => x.product[1].name != "");
     });
 }
コード例 #2
0
 public void AccessingMissingNameShouldThrow()
 {
     Assert.Throws <AssertException>(() =>
     {
         _responseWithObject
         .TestBody("should blow up", x => x.products[0].name == "")
         .Assert("should blow up");
     });
 }
コード例 #3
0
 public void ThenTheNewNameIsRight()
 {
     _responseContext
     .TestBody("name changed", x => x.id == ListId && x.name == ListName)
     .Assert("name changed");
 }
コード例 #4
0
 public void RootIdShouldBeValid()
 {
     _responseWithObject
     .TestBody("root id exist", x => x.id.ToString() == "3a6b4e0b-8e5c-df11-849b-0014c258f21e")
     .Assert("root id exist");
 }
コード例 #5
0
 public void ArrayResponseContentShouldPass()
 {
     _responseWithArray
     .TestBody("first item has AL", x => x[0].key == "AL")
     .Assert("first item has AL");
 }
コード例 #6
0
 public void ThenTheFirstNameInTheListIsNotNull()
 {
     _responseContext
     .TestBody("name is not null", x => x[0].name != null)
     .Assert("name is not null");
 }