예제 #1
0
        public void BasicTypesInExistingClassArePopulated()
        {
            var person = Angie.FastFill(new Person());

            // for test brievity
            Assert.IsTrue(!string.IsNullOrEmpty(person.FirstName), "String property was not populated. Aborting additional asserts in test.");
            Assert.IsTrue(person.Age != default(int), "Int property was not populated. Aborting additional asserts in test.");
            Assert.IsTrue(person.BirthDate != default(DateTime), "DateTime was left as default value. Aborting additional asserts in test.");
        }
예제 #2
0
        public void PopulatedBasicTypesInExistingClassRemainsUnchanged()
        {
            var firstName = "Angie";
            var age       = 29;
            var date      = DateTime.Now.AddYears(-29);
            var person    = Angie.FastFill(new Person {
                FirstName = firstName, Age = age, BirthDate = date
            });

            // for test brievity
            Assert.AreEqual(person.FirstName, firstName, "String property was altered. Aborting additional asserts in test.");
            Assert.AreEqual(person.Age, age, "Int property was altered. Aborting additional asserts in test.");
            Assert.AreEqual(person.BirthDate, date, "Date was altered. Aborting additional asserts in test.");
        }