Search in sources :

Example 1 with MConnectorHost

use of com.evolveum.midpoint.repo.sqale.qmodel.connector.MConnectorHost in project midpoint by Evolveum.

the class SqaleRepoAddDeleteObjectTest method test814ConnectorHost.

@Test
public void test814ConnectorHost() throws Exception {
    OperationResult result = createOperationResult();
    given("connector host");
    String objectName = "conn-host" + getTestNumber();
    ConnectorHostType connectorHost = new ConnectorHostType(prismContext).name(objectName).hostname("hostname").port("port");
    when("adding it to the repository");
    repositoryService.addObject(connectorHost.asPrismObject(), null, result);
    then("it is stored and relevant attributes are in columns");
    assertThatOperationResult(result).isSuccess();
    MConnectorHost row = selectObjectByOid(QConnectorHost.class, connectorHost.getOid());
    assertThat(row.hostname).isEqualTo("hostname");
    assertThat(row.port).isEqualTo("port");
}
Also used : OperationResult(com.evolveum.midpoint.schema.result.OperationResult) PolyString(com.evolveum.midpoint.prism.polystring.PolyString) MConnectorHost(com.evolveum.midpoint.repo.sqale.qmodel.connector.MConnectorHost) Test(org.testng.annotations.Test) SqaleRepoBaseTest(com.evolveum.midpoint.repo.sqale.SqaleRepoBaseTest)

Aggregations

PolyString (com.evolveum.midpoint.prism.polystring.PolyString)1 SqaleRepoBaseTest (com.evolveum.midpoint.repo.sqale.SqaleRepoBaseTest)1 MConnectorHost (com.evolveum.midpoint.repo.sqale.qmodel.connector.MConnectorHost)1 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)1 Test (org.testng.annotations.Test)1