コード例 #1
0
ファイル: tBAvatar.cs プロジェクト: j-burrows/userprofile-lib
        public void BAvatar_WhenCheckedForEquivilance_AlwaysIsFalse()
        {
            //Arrange: A avatar is created
            BAvatar avatar = new BAvatar();

            //Act: the avatar is checked to be equivilant to itself.
            bool equals = false;// avatar.Equivilant(avatar);

            //Assert: the avatar is valid for updating.
            Assert.AreEqual(false, equals);
        }
コード例 #2
0
ファイル: tBAvatar.cs プロジェクト: j-burrows/userprofile-lib
        public void BAvatarWithValidMembers_WhenUpdateValidated_ReturnsTrue()
        {
            //Arrange: A avatar with all valid members is created.
            BAvatar avatar = new BAvatar{
                Url = "Url",
                Name = "Name"
            };

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

            //Assert: the avatar is valid for updating.
            Assert.AreEqual(true, valid);
        }
コード例 #3
0
ファイル: tBAvatar.cs プロジェクト: j-burrows/userprofile-lib
        public void BAvatarWithInvalidMembers_WhenUpdateValidated_ReturnsFalse()
        {
            //Arrange: A avatar with all invalid members is created.
            BAvatar avatar = new BAvatar{
                Url = null,
                Name = "1234567890123456789012345678901234567890"
            };

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

            //Assert: the avatar is not valid for updating.
            Assert.AreEqual(false, valid);
        }
コード例 #4
0
ファイル: tBAvatar.cs プロジェクト: j-burrows/userprofile-lib
        public void BBlocked_WhenDeleteValidated_ReturnsTrue()
        {
            //Arrange: A avatar is created
            BAvatar avatar = new BAvatar();

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

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