Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Input:
- When a @User(user) ~UnMarried is (true)
- and @User(user1) ~Name is ("James"),
- @User(user) should have ~IsDead as (true)
- and @User(user) ~Name should be the same as @User(user1) ~Name
- and @User(user) ~CreatedDate should be earlier than ("22/04/2010")
- and @User(user) should have less than 3 ~Children
- Output:
- [Test]
- public void When_UnMarried_Is_Set()
- {
- IUser user = ObjectFactory.GetInstance<IUser>();
- user.UnMarried = true;
- IUser user1 = ObjectFactory.GetInstance<IUser>();
- user1.Name = "James";
- Assert.IsTrue(user.IsDead, "Failed: user.IsDead");
- Assert.IsTrue(user.Name == user1.Name, "Failed: user.Name == user1.Name");
- var dateTime0 = DateTime.Parse("22/04/2010");
- Assert.IsTrue(user.CreatedDate < dateTime0, "Failed: user.CreatedDate < dateTime0");
- Assert.IsTrue(user.Children.Count < 3, "Failed: user.Children.Count < 3");
- }
Add Comment
Please, Sign In to add comment