List of usage examples for junit.framework Assert assertEquals
static public void assertEquals(String message, int expected, int actual)
From source file:OCPTest.OCPViolationTest.java
@Test public void ocpTest() { Assert.assertEquals("Staff Member:", "Boniface" + "Kabaso" + "8702154869853" + "0781157896", staff.toString());/*w w w .j a v a 2 s .c o m*/ Assert.assertEquals("Student:", "Muneem" + "Waggie" + "9101295335084" + "0738899666", stud.toString()); Assert.assertEquals(pers, pers); }
From source file:LSPTest.LSPViolationTest.java
@Test public void LSPTest() { Assert.assertEquals("Staff Member:", "Boniface" + "Kabaso" + "8702154869853" + "0781157896" + 2000.00, staff.toString());// w ww .ja v a2 s .c o m Assert.assertEquals("Student:", "Muneem" + "Waggie" + "9101295335084" + "0738899666", stud.toString()); }
From source file:LSPTest.LSPCorrectionTest.java
@Test public void LSPCorrectionTest() { Assert.assertEquals("Staff Member:", "Boniface" + "Kabaso" + "8702154869853" + "0781157896", staff.toString());/* w ww.j a v a 2 s. c o m*/ Assert.assertEquals("Student:", "Muneem" + "Waggie" + "9101295335084" + "0738899666", stud.toString()); }
From source file:asia.stampy.client.message.connect.ConnectMessageTest.java
/** * Test of validate method, of class ConnectMessage. *///from www. j a v a2s . co m @Test public void testValidate() { System.out.println("validate"); ConnectMessage instance = new ConnectMessage("1.2", "localhost"); String message = "CONNECT\n" + "accept-version:1.2\n" + "host:localhost\n\n" + StompMessageParser.EOM; Assert.assertEquals("Should equal", message, instance.toStompMessage(true)); //instance.validate(); //fail("The test case is a prototype."); }
From source file:com.ktds.ldap.populator.AttributeCheckContextMapper.java
public DirContextAdapter mapFromContext(Object ctx) { DirContextAdapter adapter = (DirContextAdapter) ctx; Assert.assertEquals("Values and attributes need to have the same length ", expectedAttributes.length, expectedValues.length);/*www. j a v a 2s. co m*/ for (int i = 0; i < expectedAttributes.length; i++) { String attributeValue = adapter.getStringAttribute(expectedAttributes[i]); Assert.assertNotNull("Attribute " + expectedAttributes[i] + " was not present", attributeValue); Assert.assertEquals(expectedValues[i], attributeValue); } for (String absentAttribute : absentAttributes) { Assert.assertNull(adapter.getStringAttribute(absentAttribute)); } return adapter; }
From source file:com.ktds.ldap.populator.AttributeCheckAttributesMapper.java
public Object mapFromAttributes(Attributes attributes) throws NamingException { Assert.assertEquals("Values and attributes need to have the same length ", expectedAttributes.length, expectedValues.length);/*from ww w . j a v a2 s .c o m*/ for (int i = 0; i < expectedAttributes.length; i++) { Attribute attribute = attributes.get(expectedAttributes[i]); Assert.assertNotNull("Attribute " + expectedAttributes[i] + " was not present", attribute); Assert.assertEquals(expectedValues[i], attribute.get()); } for (String absentAttribute : absentAttributes) { Assert.assertNull(attributes.get(absentAttribute)); } return null; }
From source file:com.karriem.tp.tddassignment.TDDTestNGTest.java
@Test public void integer() { Assert.assertEquals("Return value not boolean", service.integer(1, 1), true); }
From source file:OCPTest.OCPCorrectionTest.java
@Test public void ocpShoolTest() { Assert.assertEquals("Staff Member:", "Boniface" + "Kabaso" + "8702154869853" + "0781157896", staff.toString());/* w w w . ja v a 2 s . c om*/ Assert.assertEquals("Student:", "Muneem" + "Waggie" + "9101295335084" + "0738899666", stud.toString()); Assert.assertEquals(pers, pers); }
From source file:com.metamx.common.parsers.JSONParserTest.java
@Test public void testSimple() { final Parser<String, Object> jsonParser = new JSONParser(); final Map<String, Object> jsonMap = jsonParser.parse(json); Assert.assertEquals("jsonMap", ImmutableMap.of("one", "foo", "two", ImmutableList.of("bar", "baz"), "three", "qux"), jsonMap); }
From source file:com.ignou.aadhar.util.BankAccountCreatorTest.java
@Test public void testValidCreateAccount() { JsonWrapper output = creatorObj.createAccount("1234567890"); Assert.assertEquals("Success response not returned.", "SUCCESS", output.get("status")); Assert.assertTrue("No Account ID was returned in Success response", ((String) output.get("id")).length() > 0); }