use of io.cucumber.messages.types.Meta in project cucumber-jvm by cucumber.
the class RuntimeTest method emits_a_meta_message.
@Test
void emits_a_meta_message() {
List<Envelope> messages = new ArrayList<>();
EventListener listener = publisher -> publisher.registerHandlerFor(Envelope.class, messages::add);
Runtime.builder().withAdditionalPlugins(listener).build().run();
Meta meta = messages.get(0).getMeta();
assertThat(meta.getProtocolVersion(), matchesPattern("\\d+\\.\\d+\\.\\d+(-RC\\d+)?(-SNAPSHOT)?"));
assertThat(meta.getImplementation().getName(), is("cucumber-jvm"));
assertThat(meta.getImplementation().getVersion(), matchesPattern("\\d+\\.\\d+\\.\\d+(-RC\\d+)?(-SNAPSHOT)?"));
assertThat(meta.getOs().getName(), matchesPattern(".+"));
assertThat(meta.getCpu().getName(), matchesPattern(".+"));
}
Aggregations