public void Test_AUsersDeleteByIdRequest_Validate_Throws_Exceptions() { // id is null var requestMock = new UsersDeleteByIdRequestMock(); Action act = () => requestMock.Validate(); act.Should().Throw <ArgumentNullException>(); // empty id requestMock = new UsersDeleteByIdRequestMock { Id = string.Empty }; act = () => requestMock.Validate(); act.Should().Throw <ArgumentException>(); // id with spaces requestMock = new UsersDeleteByIdRequestMock { Id = "invalid id" }; act = () => requestMock.Validate(); act.Should().Throw <ArgumentException>(); }
public void Test_AUsersDeleteByIdRequest_Returns_Valid_UriPathParameters() { var requestMock = new UsersDeleteByIdRequestMock { Id = "123" }; requestMock.GetUriPathParameters().Should().NotBeNull() .And.HaveCount(1) .And.Contain(new Dictionary <string, object> { ["id"] = "123" }); }
public void Test_AUsersDeleteByIdRequest_Has_AuthorizationRequirement_Required() { var request = new UsersDeleteByIdRequestMock(); request.AuthorizationRequirement.Should().Be(AuthorizationRequirement.Required); }