Guest User

Untitled

a guest
Jun 22nd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. Input:
  2.  
  3. When a @User(user) ~UnMarried is (true)
  4. and @User(user1) ~Name is ("James"),
  5. @User(user) should have ~IsDead as (true)
  6. and @User(user) ~Name should be the same as @User(user1) ~Name
  7. and @User(user) ~CreatedDate should be earlier than ("22/04/2010")
  8. and @User(user) should have less than 3 ~Children
  9.  
  10. Output:
  11.  
  12. [Test]
  13. public void When_UnMarried_Is_Set()
  14. {
  15. IUser user = ObjectFactory.GetInstance<IUser>();
  16. user.UnMarried = true;
  17. IUser user1 = ObjectFactory.GetInstance<IUser>();
  18. user1.Name = "James";
  19. Assert.IsTrue(user.IsDead, "Failed: user.IsDead");
  20. Assert.IsTrue(user.Name == user1.Name, "Failed: user.Name == user1.Name");
  21. var dateTime0 = DateTime.Parse("22/04/2010");
  22. Assert.IsTrue(user.CreatedDate < dateTime0, "Failed: user.CreatedDate < dateTime0");
  23. Assert.IsTrue(user.Children.Count < 3, "Failed: user.Children.Count < 3");
  24. }
Add Comment
Please, Sign In to add comment