public void Should_Bind_Lists_With_Poco_Objects()
        {
            var richListClass = new PocoListsClass();

            _matcher.Match(richListClass);

            Assert.IsNotNull(richListClass.Users);
            Assert.IsTrue(richListClass.Users.Count > 0);

            foreach (var user in richListClass.Users)
            {
                /* Assert to see that we have populated all of the fields on our test instance */
                Assert.AreNotEqual(user.UserID, default(int));
                Assert.AreNotEqual(user.Timestamp, default(long));
                Assert.AreNotEqual(user.DateRegistered, default(DateTime));

                Assert.IsNotNullOrEmpty(user.Name);
                Assert.IsNotNullOrEmpty(user.Email);
                Assert.IsTrue(_valid_email_regex.IsMatch(user.Email));
            }
        }
Exemple #2
0
        public void Should_Bind_Lists_With_Poco_Objects()
        {
            var richListClass = new PocoListsClass();

            _matcher.Match(richListClass);

            Assert.IsNotNull(richListClass.Users);
            Assert.IsTrue(richListClass.Users.Count > 0);

            foreach(var user in richListClass.Users)
            {
                /* Assert to see that we have populated all of the fields on our test instance */
                Assert.AreNotEqual(user.UserID, default(int));
                Assert.AreNotEqual(user.Timestamp, default(long));
                Assert.AreNotEqual(user.DateRegistered, default(DateTime));

                Assert.IsNotNullOrEmpty(user.Name);
                Assert.IsNotNullOrEmpty(user.Email);
                Assert.IsTrue(_valid_email_regex.IsMatch(user.Email));
            }
        }