All Downloads are FREE. Search and download functionalities are using the official Maven repository.

generator.server.springboot.logging.logstash.test.LogstashTcpConfigurationTest.mustache Maven / Gradle / Ivy

There is a newer version: 1.22.0
Show newest version
package {{packageName}}.wire.logstash.infrastructure.secondary;

import static org.assertj.core.api.Assertions.assertThat;

import java.io.IOException;
import java.util.Map;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.json.JsonTest;
import org.springframework.boot.test.json.JacksonTester;
import org.springframework.boot.test.json.ObjectContent;
import {{packageName}}.UnitTest;

@UnitTest
@JsonTest
class LogstashTcpConfigurationTest {

  @Autowired
  private JacksonTester> json;

  @Test
  void shouldAddAppNameOnly() throws IOException {
    LogstashTcpConfiguration c = new LogstashTcpConfiguration("jhipster-lite", null, new LogstashTcpProperties());

    ObjectContent> parsed = json.parse(c.logstashTcpLifeCycle().serializedFields());
    assertThat(parsed.getObject()).hasSize(1);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy