Esempio n. 1
0
        public void Test_CommentUnlikeRequest_Validate_Throws_Exceptions()
        {
            // id is null
            var request = new CommentUnlikeRequest();

            Action act = () => request.Validate();

            act.Should().Throw <ArgumentNullException>();

            // empty id
            request = new CommentUnlikeRequest {
                Id = string.Empty
            };

            act = () => request.Validate();
            act.Should().Throw <ArgumentException>();

            // id with spaces
            request = new CommentUnlikeRequest {
                Id = "invalid id"
            };

            act = () => request.Validate();
            act.Should().Throw <ArgumentException>();
        }