Example #1
0
        public void BImageWithValidMembers_WhenCheckedIfUpdateValid_IsTrue()
        {
            //Arrange: A entry with valid members is constructed.
            BImage image = new BImage();
            image.Format();

            //Act: the image is checked to be update valid.
            bool valid = image.UpdateValid();

            //Assert: the image is update valid.
            Assert.AreEqual(true, valid);
        }
Example #2
0
        public void BImageWithInvalidMembers_WhenCheckedIfUpdateValid_IsFalse()
        {
            //Arrange: A entry with invalid members is constructed.
            BImage image = new BImage {
                username = "******",shapes = null,Title = null
            };

            //Act: the image is checked to be update valid.
            bool valid = image.UpdateValid();

            //Assert: the image is update valid.
            Assert.IsFalse(valid);
        }