Beispiel #1
0
        public void BusinessContact_WithInvalidMembers_IsNotCreateValid()
        {
            //Arrange: A contact with an invalid first and last name is created.
            BContact contact = new BContact { First_Name = null, Last_Name = null };

            //Act: the contact is checked to be valid for creation.
            bool valid = contact.CreateValid();

            //Assert: The contact is not valid for creation
            Assert.AreEqual(false, valid);
        }
Beispiel #2
0
        public void BusinessContact_WithValidMembers_IsCreateValid()
        {
            //Arrange: A contact with a valid first and last name is created.
            BContact contact = new BContact {
                First_Name = "John",
                Last_Name = "Smith",
                username="******"
            };

            //Act: the contact is checked to be valid for creation.
            bool valid = contact.CreateValid();

            //Assert: The contact is valid for creation
            Assert.AreEqual(true, valid);
        }