List of usage examples for junit.framework Assert assertEquals
static public void assertEquals(int expected, int actual)
From source file:com.sap.prd.mobile.ios.mios.VersionInfoManagerTest.java
@Test public void testStraightForward() throws Exception { Dependency dependency = VersionInfoXmlManager.parseDependency(new File("src/test/resources/validXML.xml")); Assert.assertEquals("com.sap.ondevice.production.ios.tests", dependency.getCoordinates().getGroupId()); Assert.assertEquals("MyApp", dependency.getCoordinates().getArtifactId()); Assert.assertEquals("1.0.0", dependency.getCoordinates().getVersion()); Assert.assertEquals("scm:perforce:PERFORCEHOST:9999://MY_DEPOT_PATH", dependency.getScm().getConnection()); Assert.assertEquals("4711", dependency.getScm().getRevision()); // To be continued }
From source file:net.dontdrinkandroot.utils.lang.StringUtilsTest.java
@Test public void testIterableJoin() { List<String> parts = new ArrayList<String>(); parts.add("a"); parts.add("bee"); parts.add("cee"); Transformer<String, String> transformer = NOPTransformer.getInstance(); CharSequence result = StringUtils.join(parts, ",", transformer); Assert.assertEquals("a,bee,cee", result.toString()); }
From source file:de.odysseus.staxon.json.stream.jackson.JacksonStreamTargetTest.java
@Test public void testObjectValue() throws IOException { StringWriter writer = new StringWriter(); JacksonStreamTarget target = new JacksonStreamTarget(new JsonFactory().createGenerator(writer)); target.startObject();//w w w. j av a2 s . c o m target.name("alice"); target.value("bob"); target.endObject(); target.close(); Assert.assertEquals("{\"alice\":\"bob\"}", writer.toString()); }
From source file:org.apache.vysper.xmpp.extension.xep0124.inttests.MethodsNotAllowedIntegrationTest.java
@Test public void doNotAllowGet() throws Exception { HttpResponse response = httpclient.execute(new HttpGet(getServerUrl())); Assert.assertEquals(405, response.getStatusLine().getStatusCode()); }
From source file:com.mirth.connect.model.converters.tests.NCPDPSerializerTest.java
@Test public void test51RequestToXml() throws Exception { String input = FileUtils.readFileToString(new File("tests/test-ncpdp-51-request-input.txt")); String output = FileUtils.readFileToString(new File("tests/test-ncpdp-51-request-output.xml")); NCPDPSerializer serializer = new NCPDPSerializer(defaultProperties); Assert.assertEquals(output, TestUtil.prettyPrintXml(serializer.toXML(input))); }
From source file:com.karriem.tp2.immutable_domain_model_assignment.DomainTest.PatientsTest.ComaNGTest.java
@Test public void updateComaPatients() { Assert.assertEquals(service.createNewComa().get(0).getBedNumber(), "78"); }
From source file:beans.ParentAnnotationTest.java
@Test public void testParentAnnotation() { ChildBean child = (ChildBean) ctx.getBean("childBean"); Assert.assertEquals("defaultName", child.getName()); }
From source file:com.karriem.tp2.immutable_domain_model_assignment.DomainTest.MedicineTest.MedicineNGTest.java
@Test public void updateMedicine() { Assert.assertEquals(service.createNewMedicine().get(0).getQuantity(), 8); }
From source file:org.obiba.onyx.core.service.impl.AnyPasswordValidationStrategyImplTest.java
@Test public void testValidatePasswordReturnsList() { List<MessageSourceResolvable> messageList = anyPasswordStrategy.validatePassword(user, "password"); Assert.assertNotNull(messageList);/*from www.j a va 2 s.c om*/ Assert.assertEquals(0, messageList.size()); // Zero messages. Always valid. }
From source file:ar.com.zauber.commons.date.SignificantDateProviderTest.java
/** dia del mes */ @Test/* ww w . j a v a 2 s .c om*/ public final void testDay() { final DateProvider provider = new SignificantDateProvider(target, Calendar.DAY_OF_MONTH); Assert.assertEquals(DateUtils.truncate(new Date(1269028059L * 1000), Calendar.DAY_OF_MONTH), provider.getDate()); }