Пример #1
0
        public void BUser_ProfileWithValidMembers_WhenCreateValidated_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 create valid.
            bool valid = user_profile.CreateValid();

            //Assert: the user_profile is valid for creation.
            Assert.AreEqual(true, valid);
        }
Пример #2
0
        public void BUser_ProfileWithInvalidMembers_WhenCreateValidated_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 create valid.
            bool valid = user_profile.CreateValid();

            //Assert: the user_profile is not valid for creation.
            Assert.AreEqual(false, valid);
        }