Package org.openqreg.bean

Examples of org.openqreg.bean.Country


   
    Collection<LanguageBean> languages = LanguageFinderBase.findAll();
    Language language = languages.iterator().next();
   
    Collection<CountryBean> countries = CountryFinderBase.findAll();
    Country country = countries.iterator().next();
   
    Collection<CentretypeBean> centretypes = CentretypeFinderBase.findAll();
    Centretype centretype = centretypes.iterator().next();
   
    testCentre.setId(centreid);
    testCentre.setCentrename(centreid);
    testCentre.setBelongsto(null);
    testCentre.setCentreshortname(centreid.substring(0, 9));
    testCentre.setTimezone(null);
    testCentre.setImportformat(null);
    testCentre.setImporting(new Integer(0));
    testCentre.setStatus(new Integer(Status.ACTIVE));
    testCentre.setLanguageid(language.getLanguageid());
    testCentre.setCountryid(country.getId());
    testCentre.setTypeid(centretype.getId());
    testCentre.setTest(new Integer(1));
    testCentre.setDefaultlanguageid(language.getLanguageid());
    testCentre.setCreatedby("System");
    testCentre.setTscreated(new Timestamp(System.currentTimeMillis()));
View Full Code Here


  }

  @Test
  public void testHashCode() {

    Country c1 = new Country();
    Country c2 = new Country();

    assertTrue("Hashkoden skall vara samma f�r b�da Country", c1.hashCode() == c2.hashCode());

    c1.setId("id");
    assertFalse("Hashkoden skall vara olika f�r Countryn", c1.hashCode() == c2.hashCode());
    c2.setId("id");
    assertTrue("Hashkoden skall vara samma f�r b�da Country", c1.hashCode() == c2.hashCode());

  }
View Full Code Here

  }

  @Test
  public void testEqualsObject() {
    Country c1 = new Country();
    Country c2 = new Country();

    assertEquals("Countryn skall betraktas som lika", c1, c2);

    c1.setId("id");
    assertNotSame("Countryn skall betraktas som lika", c1, c2);
    c2.setId("id");
    assertEquals("Countryn skall betraktas som lika", c1, c2);
  }
View Full Code Here

TOP

Related Classes of org.openqreg.bean.Country

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.