示例#1
0
        public void BFriended_UserWithValidMembers_WhenCreateValidated_ReturnsTrue()
        {
            //Arrange: A friended user with all valid members is created.
            BFriended_User friended_user = new BFriended_User
            {
                username = "******",
                Author_Name = "blocked"
            };

            //Act: the friended user is checked if it is create valid.
            bool valid = friended_user.CreateValid();

            //Assert: the friended user is valid for creation.
            Assert.AreEqual(true, valid);
        }
示例#2
0
        public void BFriended_UserWithInvalidMembers_WhenCreateValidated_ReturnsFalse()
        {
            //Arrange: A friended user with all invalid members is created.
            BFriended_User friended_user = new BFriended_User
            {
                username = null,
                Author_Name = "123456789012345678789012345678901234567890"
            };

            //Act: the friended user is checked if it is create valid.
            bool valid = friended_user.CreateValid();

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