Example usage for org.springframework.boot.test.json ObjectContent assertThat

List of usage examples for org.springframework.boot.test.json ObjectContent assertThat

Introduction

In this page you can find the example usage for org.springframework.boot.test.json ObjectContent assertThat.

Prototype

@Override
    public ObjectContentAssert<T> assertThat() 

Source Link

Usage

From source file:com.hp.autonomy.frontend.configuration.server.DistributedConfigTest.java

@Override
protected void validateParsedComponent(final ObjectContent<DistributedConfig> objectContent) {
    objectContent.assertThat().hasFieldOrPropertyWithValue("distributed", false);
    objectContent.assertThat().hasFieldOrProperty("standard").isNotNull();
    objectContent.assertThat().hasFieldOrProperty("dih").isNotNull();
    objectContent.assertThat().hasFieldOrProperty("dah").isNotNull();
}

From source file:com.hp.autonomy.frontend.configuration.server.ServerConfigTest.java

@Override
protected void validateParsedComponent(final ObjectContent<ServerConfig> objectContent) {
    objectContent.assertThat().hasFieldOrPropertyWithValue("protocol", AciServerDetails.TransportProtocol.HTTP);
    objectContent.assertThat().hasFieldOrPropertyWithValue("host", "localhost");
    objectContent.assertThat().hasFieldOrPropertyWithValue("port", 16000);
    assertThat(objectContent.getObject().getProductType(), hasSize(3));
}

From source file:com.hp.autonomy.frontend.configuration.server.ServerConfigTest.java

@Override
protected void validateMergedComponent(final ObjectContent<ServerConfig> objectContent) {
    objectContent.assertThat().hasFieldOrPropertyWithValue("protocol", AciServerDetails.TransportProtocol.HTTP);
    objectContent.assertThat().hasFieldOrPropertyWithValue("host", "localhost");
    objectContent.assertThat().hasFieldOrPropertyWithValue("port", 9000);
    assertThat(objectContent.getObject().getProductType(), hasSize(3));
}

From source file:com.hp.autonomy.frontend.configuration.server.DistributedConfigTest.java

@Override
protected void validateMergedComponent(final ObjectContent<DistributedConfig> objectContent) {
    final ServerConfig standard = objectContent.getObject().getStandard();
    assertThat(standard.getHost(), is("localhost"));
    assertThat(standard.getPort(), is(9000));
    objectContent.assertThat().hasFieldOrProperty("standard").isNotNull();
    objectContent.assertThat().hasFieldOrProperty("dih").isNotNull();
    objectContent.assertThat().hasFieldOrProperty("dah").isNotNull();
}