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

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

Introduction

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

Prototype

@Override
@Deprecated
public JsonContentAssert assertThat() 

Source Link

Document

Use AssertJ's org.assertj.core.api.Assertions#assertThat assertThat instead.

Usage

From source file:com.hp.autonomy.frontend.configuration.authentication.CommunityAuthenticationTest.java

@Override
protected void validateJson(final JsonContent<TestConfig> jsonContent) {
    jsonContent.assertThat().hasJsonPathStringValue("@.authentication.name", "CommunityAuthentication");
    jsonContent.assertThat().hasJsonPathStringValue("@.authentication.method", "autonomy");
    jsonContent.assertThat().hasJsonPathStringValue("@.authentication.community.host", "test-server");
    jsonContent.assertThat().hasJsonPathNumberValue("@.authentication.community.port", 9030);
    jsonContent.assertThat().hasJsonPathStringValue("@.authentication.community.protocol", "HTTP");
    jsonContent.assertThat().hasJsonPathStringValue("@.authentication.defaultLogin.username", "admin");
    jsonContent.assertThat().extractingJsonPathStringValue("@.authentication.defaultLogin.password")
            .isNotNull();/*from w  w  w. ja  va  2 s.  com*/
}

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

@Override
protected void validateJson(final JsonContent<DistributedConfig> jsonContent) {
    jsonContent.assertThat().hasJsonPathBooleanValue("@.distributed", false);
    jsonContent.assertThat().hasJsonPathStringValue("@.standard.host", "localhost");
    jsonContent.assertThat().hasJsonPathNumberValue("@.standard.port", 9000);
}

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

@Override
protected void validateJson(final JsonContent<ServerConfig> jsonContent) {
    jsonContent.assertThat().hasJsonPathStringValue("@.host", "localhost");
    jsonContent.assertThat().hasJsonPathNumberValue("@.port", 9000);
}