Example usage for junit.framework Assert assertEquals

List of usage examples for junit.framework Assert assertEquals

Introduction

In this page you can find the example usage for junit.framework Assert assertEquals.

Prototype

static public void assertEquals(int expected, int actual) 

Source Link

Document

Asserts that two ints are equal.

Usage

From source file:com.taobao.ad.jpa.test.JobTest.java

@Test
public void testGetCurrentJobNum() {
    Assert.assertEquals(0, jobBO.getCurrentJobNum().intValue());

}

From source file:com.mirth.connect.plugins.datatypes.edi.test.EDISerializerTest.java

@Test
public void testToXml() throws Exception {
    String input = FileUtils.readFileToString(new File("tests/test-edi-input.txt"));
    String output = FileUtils.readFileToString(new File("tests/test-edi-output.xml"));
    EDISerializer serializer = new EDISerializer(new EDIDataTypeProperties().getSerializerProperties());
    Assert.assertEquals(output, serializer.toXML(input));
}

From source file:com.taobao.ad.jpa.test.RepeatAlarmTest.java

@Test
public void testGetReapeatAlermCount() {

    Assert.assertEquals(8, repeatAlarmBO.getRepeatAlarmCount().intValue());
}

From source file:com.collective.celos.ci.testing.fixtures.create.StringFixObjectCreatorTest.java

@Test
public void testStringFixObjectCreator() throws Exception {
    FixFileFromStringCreator creator = new FixFileFromStringCreator(SOME_TEXT);
    FixFile fixFile = creator.create(null);
    Assert.assertEquals(SOME_TEXT, IOUtils.toString(fixFile.getContent()));
}

From source file:amqp.spring.camel.component.SpringAMQPComponentTest.java

@Test
public void testFindRootCause() throws Exception {
    IllegalStateException child = new IllegalStateException("Child Exception");
    RuntimeException parent = new RuntimeException("Parent Exception", child);
    RuntimeException grandparent = new RuntimeException("Grandparent Exception", parent);
    Assert.assertEquals(child, SpringAMQPComponent.findRootCause(grandparent));
}

From source file:EditorTest.java

@Test
public void updateTest() {
    newEditor.equals(editor);
    newEditor.firstName("Mike").build();
    Assert.assertEquals(newEditor.build().getName(), "Mike");
}

From source file:com.karriem.tp2.principles_assignment.PLKTest.Compliance.PLKComplianceNGTest.java

@Test
public void getWrok() {

    Assert.assertEquals(service.getListOfPatients().get(0), "Kent");
    Assert.assertEquals(service.getListOfPatients().get(1), "Sissing");
}

From source file:test.model.svc.AuxSvcTest.java

@Test
public void successLoaderTest() {
    int t = auxSvc.loadTools();

    Assert.assertEquals(127, t);
    Assert.assertEquals(127, toolDao.count()); // tools
    Assert.assertEquals(4, catDao.count()); // categories
    Assert.assertEquals(29, scatDao.count()); // subcategories
}

From source file:com.dianping.lion.dao.ibatis.ProjectIbatisDaoTest.java

@Test
@Ignore//from  w  w w  .  ja  v a  2  s  . c o m
public void testGetTeams() {
    //TODO test case
    List<Team> teams = projectDao.getTeams();
    Assert.assertEquals(4, teams.size());
    Team team = teams.get(0);
    Assert.assertEquals("", team.getName());
    List<Product> products = team.getProducts();
    Assert.assertEquals(4, products.size());
    Product product = products.get(0);
    Assert.assertEquals("", product.getName());
    List<Project> projects = product.getProjects();
    Assert.assertEquals(7, projects.size());
    Project project = projects.get(0);
    Assert.assertEquals("shop-web", project.getName());
    project = projects.get(1);
    Assert.assertEquals("shop-service", project.getName());
}

From source file:FileListItemAdapterTests.java

@Test
public void test() {
    adapter = new FTPListItemAdapter();
    FTPFile f = new FTPFile();
    f.setName("a");
    f.setType(FTPFile.DIRECTORY_TYPE);/*from w w  w . ja va  2  s .  co  m*/
    FileListItem tested = adapter.getFileListItem(f);
    Assert.assertNotNull(tested);
    Assert.assertEquals("a", tested.getLabel());
    Assert.assertEquals(FileListItemTypes.DIRECTORY, tested.getType());

}