Search in sources :

Example 6 with UserDirectorySearchResult

use of io.kamax.mxisd.controller.directory.v1.io.UserDirectorySearchResult in project mxisd by kamax-io.

the class RestDirectoryProviderTest method byNameNotFound.

@Test
public void byNameNotFound() {
    stubFor(post(urlEqualTo(endpoint)).willReturn(aResponse().withHeader("Content-Type", "application/json").withBody(byNameEmptyResponse)));
    UserDirectorySearchResult result = p.searchByDisplayName(byNameSearch);
    assertTrue(!result.isLimited());
    assertTrue(result.getResults().isEmpty());
    verify(postRequestedFor(urlMatching(endpoint)).withHeader("Content-Type", containing("application/json")).withRequestBody(equalTo(byNameRequest)));
}
Also used : UserDirectorySearchResult(io.kamax.mxisd.controller.directory.v1.io.UserDirectorySearchResult) Test(org.junit.Test)

Aggregations

UserDirectorySearchResult (io.kamax.mxisd.controller.directory.v1.io.UserDirectorySearchResult)6 Test (org.junit.Test)4 MatrixID (io.kamax.matrix.MatrixID)3 UserDirectorySearchRequest (io.kamax.mxisd.controller.directory.v1.io.UserDirectorySearchRequest)1 InternalServerError (io.kamax.mxisd.exception.InternalServerError)1 URI (java.net.URI)1 Connection (java.sql.Connection)1 PreparedStatement (java.sql.PreparedStatement)1 ResultSet (java.sql.ResultSet)1 SQLException (java.sql.SQLException)1