use of com.blackducksoftware.integration.hub.alert.TestProperties in project hub-alert by blackducksoftware.
the class ChannelFreemarkerTemplatingServiceTest method testSubjectLine.
@Test
public void testSubjectLine() throws IOException, TemplateException {
final TestProperties testProperties = new TestProperties();
final ChannelFreemarkerTemplatingService channelFreemarkerTemplatingService = new ChannelFreemarkerTemplatingService(testProperties.getProperty(TestPropertyKey.TEST_EMAIL_TEMPLATE));
final String subjectLine = channelFreemarkerTemplatingService.getResolvedSubjectLine(new HashMap<>());
assertEquals("Default Subject Line - please define one", subjectLine);
}
use of com.blackducksoftware.integration.hub.alert.TestProperties in project hub-alert by blackducksoftware.
the class LoginControllerTestIT method testLogin.
@Test
public void testLogin() throws Exception {
final MockHttpServletRequestBuilder request = MockMvcRequestBuilders.post(loginUrl);
final TestProperties testProperties = new TestProperties();
final MockLoginRestModel mockLoginRestModel = new MockLoginRestModel();
mockLoginRestModel.setHubUsername(testProperties.getProperty(TestPropertyKey.TEST_USERNAME));
mockLoginRestModel.setHubPassword(testProperties.getProperty(TestPropertyKey.TEST_PASSWORD));
globalProperties.setHubTrustCertificate(Boolean.valueOf(testProperties.getProperty(TestPropertyKey.TEST_TRUST_HTTPS_CERT)));
globalProperties.setHubUrl(testProperties.getProperty(TestPropertyKey.TEST_HUB_SERVER_URL));
final String restModel = mockLoginRestModel.getRestModelJson();
request.content(restModel);
request.contentType(contentType);
mockMvc.perform(request).andExpect(MockMvcResultMatchers.status().isOk());
}
use of com.blackducksoftware.integration.hub.alert.TestProperties in project hub-alert by blackducksoftware.
the class ChannelTest method init.
@Before
public void init() throws IOException {
gson = new Gson();
properties = new TestProperties();
outputLogger = new OutputLogger();
}
Aggregations