예제 #1
0
        public void BUser_ProfileWithInvalidMembers_WhenUpdateValidated_ReturnsFalse()
        {
            //Arrange: A user_profile with all invalid members is created.
            BUser_Profile user_profile = new BUser_Profile{
                Long_Alias = "1234567890123456789012345678901234567890",
                Short_Alias = "1234567890",
                username=null
            };

            //Act: the user_profile is checked if it is update valid.
            bool valid = user_profile.UpdateValid();

            //Assert: the user_profile is not valid for updating.
            Assert.AreEqual(false, valid);
        }
예제 #2
0
        public void BUser_ProfileWithValidMembers_WhenUpdateValidated_ReturnsTrue()
        {
            //Arrange: A user_profile with all valid members is created.
            BUser_Profile user_profile = new BUser_Profile{
                Long_Alias = "Long",
                Short_Alias = "S",
                username="******"
            };

            //Act: the user_profile is checked if it is update valid.
            bool valid = user_profile.UpdateValid();

            //Assert: the user_profile is valid for updating.
            Assert.AreEqual(true, valid);
        }