コード例 #1
0
  protected OrgLabor addOrgLabor() throws Exception {
    long pk = RandomTestUtil.nextLong();

    OrgLabor orgLabor = _persistence.create(pk);

    orgLabor.setMvccVersion(RandomTestUtil.nextLong());

    orgLabor.setCompanyId(RandomTestUtil.nextLong());

    orgLabor.setOrganizationId(RandomTestUtil.nextLong());

    orgLabor.setTypeId(RandomTestUtil.nextLong());

    orgLabor.setSunOpen(RandomTestUtil.nextInt());

    orgLabor.setSunClose(RandomTestUtil.nextInt());

    orgLabor.setMonOpen(RandomTestUtil.nextInt());

    orgLabor.setMonClose(RandomTestUtil.nextInt());

    orgLabor.setTueOpen(RandomTestUtil.nextInt());

    orgLabor.setTueClose(RandomTestUtil.nextInt());

    orgLabor.setWedOpen(RandomTestUtil.nextInt());

    orgLabor.setWedClose(RandomTestUtil.nextInt());

    orgLabor.setThuOpen(RandomTestUtil.nextInt());

    orgLabor.setThuClose(RandomTestUtil.nextInt());

    orgLabor.setFriOpen(RandomTestUtil.nextInt());

    orgLabor.setFriClose(RandomTestUtil.nextInt());

    orgLabor.setSatOpen(RandomTestUtil.nextInt());

    orgLabor.setSatClose(RandomTestUtil.nextInt());

    _orgLabors.add(_persistence.update(orgLabor));

    return orgLabor;
  }
コード例 #2
0
  @Test
  public void testUpdateExisting() throws Exception {
    long pk = RandomTestUtil.nextLong();

    OrgLabor newOrgLabor = _persistence.create(pk);

    newOrgLabor.setMvccVersion(RandomTestUtil.nextLong());

    newOrgLabor.setCompanyId(RandomTestUtil.nextLong());

    newOrgLabor.setOrganizationId(RandomTestUtil.nextLong());

    newOrgLabor.setTypeId(RandomTestUtil.nextLong());

    newOrgLabor.setSunOpen(RandomTestUtil.nextInt());

    newOrgLabor.setSunClose(RandomTestUtil.nextInt());

    newOrgLabor.setMonOpen(RandomTestUtil.nextInt());

    newOrgLabor.setMonClose(RandomTestUtil.nextInt());

    newOrgLabor.setTueOpen(RandomTestUtil.nextInt());

    newOrgLabor.setTueClose(RandomTestUtil.nextInt());

    newOrgLabor.setWedOpen(RandomTestUtil.nextInt());

    newOrgLabor.setWedClose(RandomTestUtil.nextInt());

    newOrgLabor.setThuOpen(RandomTestUtil.nextInt());

    newOrgLabor.setThuClose(RandomTestUtil.nextInt());

    newOrgLabor.setFriOpen(RandomTestUtil.nextInt());

    newOrgLabor.setFriClose(RandomTestUtil.nextInt());

    newOrgLabor.setSatOpen(RandomTestUtil.nextInt());

    newOrgLabor.setSatClose(RandomTestUtil.nextInt());

    _orgLabors.add(_persistence.update(newOrgLabor));

    OrgLabor existingOrgLabor = _persistence.findByPrimaryKey(newOrgLabor.getPrimaryKey());

    Assert.assertEquals(existingOrgLabor.getMvccVersion(), newOrgLabor.getMvccVersion());
    Assert.assertEquals(existingOrgLabor.getOrgLaborId(), newOrgLabor.getOrgLaborId());
    Assert.assertEquals(existingOrgLabor.getCompanyId(), newOrgLabor.getCompanyId());
    Assert.assertEquals(existingOrgLabor.getOrganizationId(), newOrgLabor.getOrganizationId());
    Assert.assertEquals(existingOrgLabor.getTypeId(), newOrgLabor.getTypeId());
    Assert.assertEquals(existingOrgLabor.getSunOpen(), newOrgLabor.getSunOpen());
    Assert.assertEquals(existingOrgLabor.getSunClose(), newOrgLabor.getSunClose());
    Assert.assertEquals(existingOrgLabor.getMonOpen(), newOrgLabor.getMonOpen());
    Assert.assertEquals(existingOrgLabor.getMonClose(), newOrgLabor.getMonClose());
    Assert.assertEquals(existingOrgLabor.getTueOpen(), newOrgLabor.getTueOpen());
    Assert.assertEquals(existingOrgLabor.getTueClose(), newOrgLabor.getTueClose());
    Assert.assertEquals(existingOrgLabor.getWedOpen(), newOrgLabor.getWedOpen());
    Assert.assertEquals(existingOrgLabor.getWedClose(), newOrgLabor.getWedClose());
    Assert.assertEquals(existingOrgLabor.getThuOpen(), newOrgLabor.getThuOpen());
    Assert.assertEquals(existingOrgLabor.getThuClose(), newOrgLabor.getThuClose());
    Assert.assertEquals(existingOrgLabor.getFriOpen(), newOrgLabor.getFriOpen());
    Assert.assertEquals(existingOrgLabor.getFriClose(), newOrgLabor.getFriClose());
    Assert.assertEquals(existingOrgLabor.getSatOpen(), newOrgLabor.getSatOpen());
    Assert.assertEquals(existingOrgLabor.getSatClose(), newOrgLabor.getSatClose());
  }