List of usage examples for junit.framework Assert assertEquals
static public void assertEquals(int expected, int actual)
From source file:org.openmrs.module.formfilter.web.controller.FormFilterManageControllerTest.java
/** * @see {@link FormFilterManageController#manage(ModelMap)} *//*from www .j av a 2s .c o m*/ @Test @Verifies(value = "should return FormList ", method = "manage(ModelMap)") public void manage_shouldReturnFormList() { FormFilterManageController controller = new FormFilterManageController(); ModelMap model = new ModelMap(); controller.manage(model); //TODO return form list using FormFilterManageController#manage Assert.assertEquals(0, ((List<Form>) model.get("formList")).size()); }
From source file:org.ocpsoft.rewrite.servlet.config.JoinBindingConfigurationTest.java
@Test public void testUrlMappingConfiguration() throws Exception { HttpAction<HttpGet> action = get("/bind/23"); Assert.assertEquals(201, action.getResponse().getStatusLine().getStatusCode()); }
From source file:com.osbcp.cssparser.CSSParserTest.java
@Test public void testBasicSingle() throws Exception { List<Rule> rules = CSSParser.parse("div { width: 100px; }"); Assert.assertEquals(1, rules.size()); Rule rule = rules.get(0);/* w w w. j a v a 2 s .c om*/ Assert.assertEquals("div", rule.getSelectors().get(0).toString()); Assert.assertEquals("width", rule.getPropertyValues().get(0).getProperty()); Assert.assertEquals("100px", rule.getPropertyValues().get(0).getValue()); }
From source file:org.ocpsoft.rewrite.servlet.config.ParameterConfiguration2Test.java
@Test public void testParameterCanBeConfigured() throws Exception { HttpAction<HttpGet> action = get("/paramconfig"); Assert.assertEquals(245, action.getResponse().getStatusLine().getStatusCode()); }
From source file:org.ocpsoft.rewrite.spring.resolver.SpringBeanNameResolverTest.java
@Test public void testSpringBeanNameResolver() throws Exception { HttpAction<HttpGet> action = get("/name/christian"); Assert.assertEquals(200, action.getResponse().getStatusLine().getStatusCode()); Assert.assertEquals("/hello/CHRISTIAN", action.getCurrentContextRelativeURL()); }
From source file:org.apache.vysper.xmpp.extension.xep0124.inttests.DefaultAllowedOriginIntegrationTest.java
@Test public void optionsAccessControlAllowOrigin() throws Exception { HttpResponse response = httpclient.execute(new HttpOptions(getServerUrl())); Assert.assertEquals(0, response.getHeaders("Access-Control-Allow-Origin").length); }
From source file:com.brienwheeler.lib.spring.beans.SmartXmlBeanDefinitionReaderTest.java
@Test public void testLoadBeanDefinitions() { SmartXmlBeanDefinitionReader reader = new SmartXmlBeanDefinitionReader(new DefaultListableBeanFactory()); int definitionCount = reader.loadBeanDefinitions(TestConstants.CTX_BEAN_DUMPER); Assert.assertEquals(1, definitionCount); definitionCount = reader.loadBeanDefinitions(TestConstants.CTX_BEAN_DUMPER); Assert.assertEquals(0, definitionCount); }
From source file:org.ocpsoft.rewrite.servlet.config.ServletMappingConfigurationTest.java
@Test public void testServletMappingConditionMatches() throws Exception { HttpAction<HttpGet> action = get("/test-with-mapped-url"); Assert.assertEquals(210, action.getResponse().getStatusLine().getStatusCode()); }
From source file:org.ocpsoft.rewrite.servlet.config.ParameterWildcardConfiguration2Test.java
@Test public void testWildcardParameter() throws Exception { HttpAction<HttpGet> action = get("/test.txt"); Assert.assertEquals(200, action.getStatusCode()); }
From source file:org.ocpsoft.rewrite.servlet.config.JoinOutboundConfigurationTest.java
@Test public void testUrlMappingConfiguration() throws Exception { HttpAction<HttpGet> action = get("/valid_outbound"); Assert.assertEquals(200, action.getResponse().getStatusLine().getStatusCode()); }