use of org.hamcrest.core.StringStartsWith in project jbosstools-openshift by jbosstools.
the class DeleteResourceTest method testDeletePod.
@Test
public void testDeletePod() {
OpenShiftResource applicationPod = OpenShiftUtils.getOpenShiftPod(projectReq.getProjectName(), new StringStartsWith("eap-app-"), connectionReq.getConnection());
String podName = applicationPod.getName();
applicationPod.delete();
try {
OpenShiftResourceExists openShiftResourceExists = new OpenShiftResourceExists(Resource.POD, podName, ResourceState.UNSPECIFIED, projectReq.getProjectName(), connectionReq.getConnection());
new WaitWhile(openShiftResourceExists, TimePeriod.getCustom(15));
} catch (WaitTimeoutExpiredException ex) {
fail("Application pod should be deleted at this point, but it it still present.");
}
}
use of org.hamcrest.core.StringStartsWith in project jbosstools-openshift by jbosstools.
the class CreateApplicationFromTemplateTest method importApplicationAndVerify.
public static void importApplicationAndVerify(String projectName) {
new WaitUntil(new ShellIsAvailable(OpenShiftLabel.Shell.IMPORT_APPLICATION));
new DefaultShell(OpenShiftLabel.Shell.IMPORT_APPLICATION);
try {
new CheckBox(new WithTextMatcher(new StringStartsWith("Do not clone"))).toggle(true);
} catch (CoreLayerException ex) {
// git directory is not in use
} catch (WaitTimeoutExpiredException ex) {
// swallow, checkbox is disabled
}
new FinishButton().click();
ProjectExplorer projectExplorer = new ProjectExplorer();
projectExplorer.open();
OpenShiftUtils.handleCheatSheetCreateServerAdapter();
new WaitUntil(new ProjectExists(projectName, new ProjectExplorer()), TimePeriod.LONG, false);
assertTrue("Project Explorer should contain imported project " + projectName, projectExplorer.containsProject(projectName));
}
use of org.hamcrest.core.StringStartsWith in project nextprot-api by calipho-sib.
the class SitemapXMLIntegrationTest method shouldReturnCorrectValuesForSitemap.
@Test
public void shouldReturnCorrectValuesForSitemap() throws Exception {
ResultActions actions = this.mockMvc.perform(get("/seo/sitemap"));
actions.andExpect(xpath("/ns:urlset/ns:url/ns:changefreq", NS).string("weekly"));
actions.andExpect(xpath("/ns:urlset/ns:url/ns:loc", NS).string(new StringStartsWith("https://www.nextprot.org")));
}
use of org.hamcrest.core.StringStartsWith in project alluxio by Alluxio.
the class GrpcSecurityTest method testServerUnsupportedAuthentication.
@Test
public void testServerUnsupportedAuthentication() {
mThrown.expect(RuntimeException.class);
mThrown.expectMessage(new StringStartsWith(false, "No factory could create a UserState with authType: " + AuthType.KERBEROS.name()));
createServer(AuthType.KERBEROS);
}
use of org.hamcrest.core.StringStartsWith in project flink by apache.
the class DataStreamTest method testPOJOWithNestedArrayNoHashCodeKeyRejection.
// ////////////// Composite Key Tests : POJOs ////////////////
@Test
public void testPOJOWithNestedArrayNoHashCodeKeyRejection() {
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
DataStream<POJOWithHashCode> input = env.fromElements(new POJOWithHashCode(new int[] { 1, 2 }));
TypeInformation<?> expectedTypeInfo = new TupleTypeInfo<Tuple1<int[]>>(PrimitiveArrayTypeInfo.INT_PRIMITIVE_ARRAY_TYPE_INFO);
// adjust the rule
expectedException.expect(InvalidProgramException.class);
expectedException.expectMessage(new StringStartsWith("Type " + expectedTypeInfo + " cannot be used as key."));
input.keyBy("id");
}
Aggregations