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.karriem.tp2.immutable_domain_model_assignment.DomainTest.PaymentMethodTest.MonthlyPaymentNGTest.java

@Test
public void createMonthly() {

    Assert.assertEquals(service.createMonthly().get(0).getPatientID(), "P1001");
}

From source file:com.collective.celos.ci.deploy.JScpWorkerTest.java

@Test
public void getURIRespectingUsernameChanges() throws FileSystemException, URISyntaxException {
    JScpWorker worker = new JScpWorker("uname");

    URI uri = worker.getURIRespectingUsername(URI.create("sftp://server/path1/path2"));
    Assert.assertEquals(uri, URI.create("sftp://uname@server/path1/path2"));
}

From source file:com.karriem.tp2.principles_assignment.ISPTest.Compliance.ISPComplianceNGTest.java

@Test
public void getStuff() {

    Assert.assertEquals(wService.work(), "Parker");
    Assert.assertEquals(aService.age(), 25);
}

From source file:streaming.test.FilmDaoTest.java

@Test
public void test() {
    Assert.assertEquals("Aliens", filmDao.findOne(2L).getTitre());
}

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

@Test
public void getUserSub() {

    JobUserSubDO sub = new JobUserSubDO();
    sub.setJobGroup("110");
    sub.setJobName("dtJustTest");
    sub.setUserId(2L);// w  w w  .j a  va2s .c  o m
    sub.setType(0);
    sub = jobUserSubBO.getUserSub(sub);

    Assert.assertNotNull(sub);
    Assert.assertEquals("110", sub.getJobGroup());
    Assert.assertEquals("dtJustTest", sub.getJobName());
    Assert.assertEquals(2L, sub.getUserId().longValue());
    Assert.assertEquals(0, sub.getType());
    Assert.assertEquals(1, sub.getWangwang());
    Assert.assertEquals(1, sub.getEmail());
    Assert.assertEquals(1, sub.getMobile());
}

From source file:forum.test.MappingJUnitTest.java

@Test
public void UtilisateurisddOk() {
    Assert.assertEquals("dd", dao.findOne(1L).getLogin());
}

From source file:azkaban.crypto.DecryptionTest.java

@Test
public void testV1_1() throws IOException {
    BasicConfigurator.configure();//from  w w w.ja v a  2  s. com
    Logger.getRootLogger().setLevel(Level.DEBUG);

    String expected = "test";

    String ciphered = "eyJ2ZXIiOiIxLjEiLCJ2YWwiOiJpaE9CM2VzTzBad2F4cHZBV2Z5YUVicHZLQzJBWDJZZnVzS3hVWFN2R3A0PSJ9";
    String passphrase = "test1234";

    Crypto crypto = new Crypto();
    String actual = crypto.decrypt(ciphered, passphrase);
    Assert.assertEquals(expected, actual);

    try {
        new CryptoV1().decrypt(ciphered, passphrase);
        Assert.fail("Should have failed when decrypt v1.1 ciphered text with v1 decryption.");
    } catch (Exception e) {
        Assert.assertTrue(e instanceof RuntimeException);
    }
}

From source file:nz.net.orcon.kanban.controllers.HomeControllerTest.java

@Test
public void testController() {
    HomeController controller = new HomeController();
    controller.setSpringSecurityFilterChain(new Object());
    Model model = new ExtendedModelMap();
    Assert.assertEquals("home", controller.home(model));
}

From source file:com.karriem.tp2.principles_assignment.SRPTest.Compliance.SRPComplianceNGTest.java

@Test
public void getStaff() {

    Assert.assertEquals(aService.getDoctorAge(), 23);
    Assert.assertEquals(nService.getDoctorName(), "Karriem");
}

From source file:org.openmrs.module.registrationcore.api.search.ExistingPatientNameSearchTest.java

@Test
public void findSimilarGivenNames_shouldFindAmongExistingGivenNames() {
    List<String> names = search.findSimilarGivenNames("Kip");

    Assert.assertEquals(Arrays.asList("Kiptogom"), names);
}