Пример #1
0
        public void UpdateImageReference_WHEN_newImageReference_parameter_Has_Same_Id_As_Existing_ImageReference_THEN_Does_Not_Update_ImageReference_Property()
        {
            var imageReference1 = GetImageReference();
            var post = new BlogPost("ABC", "description", "fullText", imageReference1, DateTime.Now, new BlogUser());

            var imageReference2 = GetImageReference();
            post.UpdateImageReference(imageReference2);

            post.ImageReference.ShouldEqual(imageReference1);
        }
Пример #2
0
        public void UpdateImageReference_WHEN_newImageReference_parameter_Is_Null_THEN_Throws_ArgumentNullException()
        {
            var imageReference = GetImageReference();
            var post = new BlogPost("ABC", "description", "fullText", imageReference, DateTime.Now, new BlogUser());

            post.UpdateImageReference(null);
        }
Пример #3
0
        public void UpdateImageReference_Sets_ImageReference_Property_To_newImageReference_parameter()
        {
            var imageReference1 = GetImageReference();
            var post = new BlogPost("ABC", "description", "fullText", imageReference1, DateTime.Now, new BlogUser());

            var imageReference2 = GetImageReference(2, "/anotherNoneImage.jpg");
            post.UpdateImageReference(imageReference2);

            post.ImageReference.ShouldEqual(imageReference2);
        }