use of io.qameta.allure.Description in project mule by mulesoft.
the class BytesStreamingExtensionTestCase method rewind.
@Test
@Description("Rewing a stream and consume it twice")
public void rewind() throws Exception {
CoreEvent result = flowRunner("rewind").withPayload(data).run();
Message firstRead = (Message) result.getVariables().get("firstRead").getValue();
Message secondRead = (Message) result.getVariables().get("secondRead").getValue();
assertThat(firstRead.getPayload().getValue(), equalTo(data));
assertThat(secondRead.getPayload().getValue(), equalTo(data));
}
use of io.qameta.allure.Description in project mule by mulesoft.
the class ObjectStreamingExtensionTestCase method getObjectStreamWithTargetValue.
@Test
@Description("Stores an object stream in a variable leaving without modifying the original payload")
public void getObjectStreamWithTargetValue() throws Exception {
CoreEvent event = flowRunner("getStreamWithTargetValue").withPayload(data).run();
assertThat(event.getVariables().get(MY_STREAM_VAR).getValue(), is(instanceOf(String.class)));
assertThat(event.getVariables().get(MY_STREAM_VAR).getValue(), equalTo(data.get(0)));
}
use of io.qameta.allure.Description in project mule by mulesoft.
the class MavenConfigTestCase method loadFromFileWithAdditionalRepoFromSystemProperty.
@Description("Loads the configuration from mule-config.json and adds an additional maven repository using system properties")
@Test
public void loadFromFileWithAdditionalRepoFromSystemProperty() throws Exception {
String additionalRepositoryUrl = "http://localhost/host";
testWithSystemProperty("muleRuntimeConfig.maven.repositories.customRepo.url", additionalRepositoryUrl, () -> {
GlobalConfigLoader.reset();
MavenConfiguration mavenConfig = getMavenConfig();
List<RemoteRepository> mavenRemoteRepositories = mavenConfig.getMavenRemoteRepositories();
assertThat(mavenRemoteRepositories, hasSize(2));
assertThat(mavenRemoteRepositories.get(0).getId(), is("customRepo"));
assertThat(mavenRemoteRepositories.get(0).getUrl(), is(new URL(additionalRepositoryUrl)));
assertThat(mavenRemoteRepositories.get(1).getId(), is("mavenCentral"));
assertThat(mavenRemoteRepositories.get(1).getUrl(), is(new URL(MAVEN_CENTRAL_URL)));
});
}
use of io.qameta.allure.Description in project mule by mulesoft.
the class MavenConfigTestCase method loadFromFileOnly.
@Description("Test a single file loaded from the classpath and verifies that the mule.conf and mule.properties json are not taken into account.")
@Test
public void loadFromFileOnly() throws MalformedURLException {
GlobalConfigLoader.reset();
MavenConfiguration mavenConfig = getMavenConfig();
List<RemoteRepository> remoteRepositories = mavenConfig.getMavenRemoteRepositories();
assertThat(remoteRepositories, hasSize(1));
RemoteRepository remoteRepository = remoteRepositories.get(0);
assertThat(remoteRepository.getId(), is(MAVEN_CENTRAL_REPO_ID));
assertThat(remoteRepository.getUrl(), is(new URL(MAVEN_CENTRAL_URL)));
assertThat(remoteRepository.getAuthentication().get().getPassword(), is("password"));
assertThat(remoteRepository.getAuthentication().get().getUsername(), is("username"));
}
use of io.qameta.allure.Description in project mule by mulesoft.
the class YamlConfigurationPropertiesComponentTestCase method complexListOfObjectsNotSuported.
@Description("Validates that a list of complex objects is not valid")
@Test
public void complexListOfObjectsNotSuported() throws InitialisationException {
configurationComponent = new DefaultConfigurationPropertiesProvider("complex-list-object.yaml", externalResourceProvider);
expectedException.expectMessage("Configuration properties does not support type a list of complex types. Complex type keys are: complex");
expectedException.expect(ConfigurationPropertiesException.class);
configurationComponent.initialise();
}
Aggregations