public void Test_UserCommentsRequest_Validate_Throws_Exceptions() { // username is null var requestMock = new UserCommentsRequest(); Action act = () => requestMock.Validate(); act.Should().Throw <ArgumentNullException>(); // empty username requestMock = new UserCommentsRequest { Username = string.Empty }; act = () => requestMock.Validate(); act.Should().Throw <ArgumentException>(); // username with spaces requestMock = new UserCommentsRequest { Username = "******" }; act = () => requestMock.Validate(); act.Should().Throw <ArgumentException>(); }
public void Test_UserCommentsRequest_Has_Valid_UriTemplate() { var request = new UserCommentsRequest(); request.UriTemplate.Should().Be("users/{username}/comments{/comment_type}{/object_type}{?include_replies,extended,page,limit}"); }
public void Test_UserCommentsRequest_Has_AuthorizationRequirement_Optional() { var request = new UserCommentsRequest(); request.AuthorizationRequirement.Should().Be(AuthorizationRequirement.Optional); }