public void Test_UserListCommentsRequest_Validate_Throws_Exceptions() { // username is null var requestMock = new UserListCommentsRequest { Id = "123" }; Action act = () => requestMock.Validate(); act.Should().Throw <ArgumentNullException>(); // empty username requestMock = new UserListCommentsRequest { Username = string.Empty, Id = "123" }; act = () => requestMock.Validate(); act.Should().Throw <ArgumentException>(); // username with spaces requestMock = new UserListCommentsRequest { Username = "******", Id = "123" }; act = () => requestMock.Validate(); act.Should().Throw <ArgumentException>(); // id is null requestMock = new UserListCommentsRequest { Username = "******" }; act = () => requestMock.Validate(); act.Should().Throw <ArgumentNullException>(); // empty id requestMock = new UserListCommentsRequest { Username = "******", Id = string.Empty }; act = () => requestMock.Validate(); act.Should().Throw <ArgumentException>(); // id with spaces requestMock = new UserListCommentsRequest { Username = "******", Id = "invalid id" }; act = () => requestMock.Validate(); act.Should().Throw <ArgumentException>(); }