@Test public void testCountByG_P_L() throws Exception { _persistence.countByG_P_L( RandomTestUtil.nextLong(), RandomTestUtil.randomBoolean(), RandomTestUtil.nextLong()); _persistence.countByG_P_L(0L, RandomTestUtil.randomBoolean(), 0L); }
@Test public void testUpdateExisting() throws Exception { long pk = RandomTestUtil.nextLong(); Status newStatus = _persistence.create(pk); newStatus.setUserId(RandomTestUtil.nextLong()); newStatus.setModifiedDate(RandomTestUtil.nextLong()); newStatus.setOnline(RandomTestUtil.randomBoolean()); newStatus.setAwake(RandomTestUtil.randomBoolean()); newStatus.setActivePanelIds(RandomTestUtil.randomString()); newStatus.setMessage(RandomTestUtil.randomString()); newStatus.setPlaySound(RandomTestUtil.randomBoolean()); _statuses.add(_persistence.update(newStatus)); Status existingStatus = _persistence.findByPrimaryKey(newStatus.getPrimaryKey()); Assert.assertEquals(existingStatus.getStatusId(), newStatus.getStatusId()); Assert.assertEquals(existingStatus.getUserId(), newStatus.getUserId()); Assert.assertEquals(existingStatus.getModifiedDate(), newStatus.getModifiedDate()); Assert.assertEquals(existingStatus.getOnline(), newStatus.getOnline()); Assert.assertEquals(existingStatus.getAwake(), newStatus.getAwake()); Assert.assertEquals(existingStatus.getActivePanelIds(), newStatus.getActivePanelIds()); Assert.assertEquals(existingStatus.getMessage(), newStatus.getMessage()); Assert.assertEquals(existingStatus.getPlaySound(), newStatus.getPlaySound()); }
protected Country addCountry() throws Exception { long pk = RandomTestUtil.nextLong(); Country country = _persistence.create(pk); country.setMvccVersion(RandomTestUtil.nextLong()); country.setName(RandomTestUtil.randomString()); country.setA2(RandomTestUtil.randomString()); country.setA3(RandomTestUtil.randomString()); country.setNumber(RandomTestUtil.randomString()); country.setIdd(RandomTestUtil.randomString()); country.setZipRequired(RandomTestUtil.randomBoolean()); country.setActive(RandomTestUtil.randomBoolean()); _countries.add(_persistence.update(country)); return country; }
protected MBMailingList addMBMailingList() throws Exception { long pk = RandomTestUtil.nextLong(); MBMailingList mbMailingList = _persistence.create(pk); mbMailingList.setUuid(RandomTestUtil.randomString()); mbMailingList.setGroupId(RandomTestUtil.nextLong()); mbMailingList.setCompanyId(RandomTestUtil.nextLong()); mbMailingList.setUserId(RandomTestUtil.nextLong()); mbMailingList.setUserName(RandomTestUtil.randomString()); mbMailingList.setCreateDate(RandomTestUtil.nextDate()); mbMailingList.setModifiedDate(RandomTestUtil.nextDate()); mbMailingList.setCategoryId(RandomTestUtil.nextLong()); mbMailingList.setEmailAddress(RandomTestUtil.randomString()); mbMailingList.setInProtocol(RandomTestUtil.randomString()); mbMailingList.setInServerName(RandomTestUtil.randomString()); mbMailingList.setInServerPort(RandomTestUtil.nextInt()); mbMailingList.setInUseSSL(RandomTestUtil.randomBoolean()); mbMailingList.setInUserName(RandomTestUtil.randomString()); mbMailingList.setInPassword(RandomTestUtil.randomString()); mbMailingList.setInReadInterval(RandomTestUtil.nextInt()); mbMailingList.setOutEmailAddress(RandomTestUtil.randomString()); mbMailingList.setOutCustom(RandomTestUtil.randomBoolean()); mbMailingList.setOutServerName(RandomTestUtil.randomString()); mbMailingList.setOutServerPort(RandomTestUtil.nextInt()); mbMailingList.setOutUseSSL(RandomTestUtil.randomBoolean()); mbMailingList.setOutUserName(RandomTestUtil.randomString()); mbMailingList.setOutPassword(RandomTestUtil.randomString()); mbMailingList.setAllowAnonymous(RandomTestUtil.randomBoolean()); mbMailingList.setActive(RandomTestUtil.randomBoolean()); _mbMailingLists.add(_persistence.update(mbMailingList)); return mbMailingList; }
@Test public void testCountByC_C_A() throws Exception { _persistence.countByC_C_A( RandomTestUtil.nextLong(), StringPool.BLANK, RandomTestUtil.randomBoolean()); _persistence.countByC_C_A(0L, StringPool.NULL, RandomTestUtil.randomBoolean()); _persistence.countByC_C_A(0L, (String) null, RandomTestUtil.randomBoolean()); }
@Test public void testCountByG_P_L_P() throws Exception { _persistence.countByG_P_L_P( RandomTestUtil.nextLong(), RandomTestUtil.randomBoolean(), RandomTestUtil.nextLong(), StringPool.BLANK); _persistence.countByG_P_L_P(0L, RandomTestUtil.randomBoolean(), 0L, StringPool.NULL); _persistence.countByG_P_L_P(0L, RandomTestUtil.randomBoolean(), 0L, (String) null); }
protected Address addAddress() throws Exception { long pk = RandomTestUtil.nextLong(); Address address = _persistence.create(pk); address.setMvccVersion(RandomTestUtil.nextLong()); address.setUuid(RandomTestUtil.randomString()); address.setCompanyId(RandomTestUtil.nextLong()); address.setUserId(RandomTestUtil.nextLong()); address.setUserName(RandomTestUtil.randomString()); address.setCreateDate(RandomTestUtil.nextDate()); address.setModifiedDate(RandomTestUtil.nextDate()); address.setClassNameId(RandomTestUtil.nextLong()); address.setClassPK(RandomTestUtil.nextLong()); address.setStreet1(RandomTestUtil.randomString()); address.setStreet2(RandomTestUtil.randomString()); address.setStreet3(RandomTestUtil.randomString()); address.setCity(RandomTestUtil.randomString()); address.setZip(RandomTestUtil.randomString()); address.setRegionId(RandomTestUtil.nextLong()); address.setCountryId(RandomTestUtil.nextLong()); address.setTypeId(RandomTestUtil.nextLong()); address.setMailing(RandomTestUtil.randomBoolean()); address.setPrimary(RandomTestUtil.randomBoolean()); address.setLastPublishDate(RandomTestUtil.nextDate()); _addresses.add(_persistence.update(address)); return address; }
protected Website addWebsite() throws Exception { long pk = RandomTestUtil.nextLong(); Website website = _persistence.create(pk); website.setMvccVersion(RandomTestUtil.nextLong()); website.setUuid(RandomTestUtil.randomString()); website.setCompanyId(RandomTestUtil.nextLong()); website.setUserId(RandomTestUtil.nextLong()); website.setUserName(RandomTestUtil.randomString()); website.setCreateDate(RandomTestUtil.nextDate()); website.setModifiedDate(RandomTestUtil.nextDate()); website.setClassNameId(RandomTestUtil.nextLong()); website.setClassPK(RandomTestUtil.nextLong()); website.setUrl(RandomTestUtil.randomString()); website.setTypeId(RandomTestUtil.nextLong()); website.setPrimary(RandomTestUtil.randomBoolean()); website.setLastPublishDate(RandomTestUtil.nextDate()); _websites.add(_persistence.update(website)); return website; }
@Test public void testUpdateExisting() throws Exception { long pk = RandomTestUtil.nextLong(); Website newWebsite = _persistence.create(pk); newWebsite.setMvccVersion(RandomTestUtil.nextLong()); newWebsite.setUuid(RandomTestUtil.randomString()); newWebsite.setCompanyId(RandomTestUtil.nextLong()); newWebsite.setUserId(RandomTestUtil.nextLong()); newWebsite.setUserName(RandomTestUtil.randomString()); newWebsite.setCreateDate(RandomTestUtil.nextDate()); newWebsite.setModifiedDate(RandomTestUtil.nextDate()); newWebsite.setClassNameId(RandomTestUtil.nextLong()); newWebsite.setClassPK(RandomTestUtil.nextLong()); newWebsite.setUrl(RandomTestUtil.randomString()); newWebsite.setTypeId(RandomTestUtil.nextLong()); newWebsite.setPrimary(RandomTestUtil.randomBoolean()); newWebsite.setLastPublishDate(RandomTestUtil.nextDate()); _websites.add(_persistence.update(newWebsite)); Website existingWebsite = _persistence.findByPrimaryKey(newWebsite.getPrimaryKey()); Assert.assertEquals(existingWebsite.getMvccVersion(), newWebsite.getMvccVersion()); Assert.assertEquals(existingWebsite.getUuid(), newWebsite.getUuid()); Assert.assertEquals(existingWebsite.getWebsiteId(), newWebsite.getWebsiteId()); Assert.assertEquals(existingWebsite.getCompanyId(), newWebsite.getCompanyId()); Assert.assertEquals(existingWebsite.getUserId(), newWebsite.getUserId()); Assert.assertEquals(existingWebsite.getUserName(), newWebsite.getUserName()); Assert.assertEquals( Time.getShortTimestamp(existingWebsite.getCreateDate()), Time.getShortTimestamp(newWebsite.getCreateDate())); Assert.assertEquals( Time.getShortTimestamp(existingWebsite.getModifiedDate()), Time.getShortTimestamp(newWebsite.getModifiedDate())); Assert.assertEquals(existingWebsite.getClassNameId(), newWebsite.getClassNameId()); Assert.assertEquals(existingWebsite.getClassPK(), newWebsite.getClassPK()); Assert.assertEquals(existingWebsite.getUrl(), newWebsite.getUrl()); Assert.assertEquals(existingWebsite.getTypeId(), newWebsite.getTypeId()); Assert.assertEquals(existingWebsite.getPrimary(), newWebsite.getPrimary()); Assert.assertEquals( Time.getShortTimestamp(existingWebsite.getLastPublishDate()), Time.getShortTimestamp(newWebsite.getLastPublishDate())); }
protected Calendar addCalendar() throws Exception { long pk = RandomTestUtil.nextLong(); Calendar calendar = _persistence.create(pk); calendar.setUuid(RandomTestUtil.randomString()); calendar.setGroupId(RandomTestUtil.nextLong()); calendar.setCompanyId(RandomTestUtil.nextLong()); calendar.setUserId(RandomTestUtil.nextLong()); calendar.setUserName(RandomTestUtil.randomString()); calendar.setCreateDate(RandomTestUtil.nextDate()); calendar.setModifiedDate(RandomTestUtil.nextDate()); calendar.setResourceBlockId(RandomTestUtil.nextLong()); calendar.setCalendarResourceId(RandomTestUtil.nextLong()); calendar.setName(RandomTestUtil.randomString()); calendar.setDescription(RandomTestUtil.randomString()); calendar.setTimeZoneId(RandomTestUtil.randomString()); calendar.setColor(RandomTestUtil.nextInt()); calendar.setDefaultCalendar(RandomTestUtil.randomBoolean()); calendar.setEnableComments(RandomTestUtil.randomBoolean()); calendar.setEnableRatings(RandomTestUtil.randomBoolean()); calendar.setLastPublishDate(RandomTestUtil.nextDate()); _calendars.add(_persistence.update(calendar)); return calendar; }
protected LayoutSet addLayoutSet() throws Exception { long pk = RandomTestUtil.nextLong(); LayoutSet layoutSet = _persistence.create(pk); layoutSet.setMvccVersion(RandomTestUtil.nextLong()); layoutSet.setGroupId(RandomTestUtil.nextLong()); layoutSet.setCompanyId(RandomTestUtil.nextLong()); layoutSet.setCreateDate(RandomTestUtil.nextDate()); layoutSet.setModifiedDate(RandomTestUtil.nextDate()); layoutSet.setPrivateLayout(RandomTestUtil.randomBoolean()); layoutSet.setLogoId(RandomTestUtil.nextLong()); layoutSet.setThemeId(RandomTestUtil.randomString()); layoutSet.setColorSchemeId(RandomTestUtil.randomString()); layoutSet.setWapThemeId(RandomTestUtil.randomString()); layoutSet.setWapColorSchemeId(RandomTestUtil.randomString()); layoutSet.setCss(RandomTestUtil.randomString()); layoutSet.setPageCount(RandomTestUtil.nextInt()); layoutSet.setSettings(RandomTestUtil.randomString()); layoutSet.setLayoutSetPrototypeUuid(RandomTestUtil.randomString()); layoutSet.setLayoutSetPrototypeLinkEnabled(RandomTestUtil.randomBoolean()); _layoutSets.add(_persistence.update(layoutSet)); return layoutSet; }
protected Status addStatus() throws Exception { long pk = RandomTestUtil.nextLong(); Status status = _persistence.create(pk); status.setUserId(RandomTestUtil.nextLong()); status.setModifiedDate(RandomTestUtil.nextLong()); status.setOnline(RandomTestUtil.randomBoolean()); status.setAwake(RandomTestUtil.randomBoolean()); status.setActivePanelIds(RandomTestUtil.randomString()); status.setMessage(RandomTestUtil.randomString()); status.setPlaySound(RandomTestUtil.randomBoolean()); _statuses.add(_persistence.update(status)); return status; }
@Test public void testUpdateExisting() throws Exception { long pk = RandomTestUtil.nextLong(); Country newCountry = _persistence.create(pk); newCountry.setMvccVersion(RandomTestUtil.nextLong()); newCountry.setName(RandomTestUtil.randomString()); newCountry.setA2(RandomTestUtil.randomString()); newCountry.setA3(RandomTestUtil.randomString()); newCountry.setNumber(RandomTestUtil.randomString()); newCountry.setIdd(RandomTestUtil.randomString()); newCountry.setZipRequired(RandomTestUtil.randomBoolean()); newCountry.setActive(RandomTestUtil.randomBoolean()); _countries.add(_persistence.update(newCountry)); Country existingCountry = _persistence.findByPrimaryKey(newCountry.getPrimaryKey()); Assert.assertEquals(existingCountry.getMvccVersion(), newCountry.getMvccVersion()); Assert.assertEquals(existingCountry.getCountryId(), newCountry.getCountryId()); Assert.assertEquals(existingCountry.getName(), newCountry.getName()); Assert.assertEquals(existingCountry.getA2(), newCountry.getA2()); Assert.assertEquals(existingCountry.getA3(), newCountry.getA3()); Assert.assertEquals(existingCountry.getNumber(), newCountry.getNumber()); Assert.assertEquals(existingCountry.getIdd(), newCountry.getIdd()); Assert.assertEquals(existingCountry.getZipRequired(), newCountry.getZipRequired()); Assert.assertEquals(existingCountry.getActive(), newCountry.getActive()); }
protected KaleoTaskInstanceToken addKaleoTaskInstanceToken() throws Exception { long pk = RandomTestUtil.nextLong(); KaleoTaskInstanceToken kaleoTaskInstanceToken = _persistence.create(pk); kaleoTaskInstanceToken.setGroupId(RandomTestUtil.nextLong()); kaleoTaskInstanceToken.setCompanyId(RandomTestUtil.nextLong()); kaleoTaskInstanceToken.setUserId(RandomTestUtil.nextLong()); kaleoTaskInstanceToken.setUserName(RandomTestUtil.randomString()); kaleoTaskInstanceToken.setCreateDate(RandomTestUtil.nextDate()); kaleoTaskInstanceToken.setModifiedDate(RandomTestUtil.nextDate()); kaleoTaskInstanceToken.setKaleoDefinitionId(RandomTestUtil.nextLong()); kaleoTaskInstanceToken.setKaleoInstanceId(RandomTestUtil.nextLong()); kaleoTaskInstanceToken.setKaleoInstanceTokenId(RandomTestUtil.nextLong()); kaleoTaskInstanceToken.setKaleoTaskId(RandomTestUtil.nextLong()); kaleoTaskInstanceToken.setKaleoTaskName(RandomTestUtil.randomString()); kaleoTaskInstanceToken.setClassName(RandomTestUtil.randomString()); kaleoTaskInstanceToken.setClassPK(RandomTestUtil.nextLong()); kaleoTaskInstanceToken.setCompletionUserId(RandomTestUtil.nextLong()); kaleoTaskInstanceToken.setCompleted(RandomTestUtil.randomBoolean()); kaleoTaskInstanceToken.setCompletionDate(RandomTestUtil.nextDate()); kaleoTaskInstanceToken.setDueDate(RandomTestUtil.nextDate()); kaleoTaskInstanceToken.setWorkflowContext(RandomTestUtil.randomString()); _kaleoTaskInstanceTokens.add(_persistence.update(kaleoTaskInstanceToken)); return kaleoTaskInstanceToken; }
protected CalendarResource addCalendarResource() throws Exception { long pk = RandomTestUtil.nextLong(); CalendarResource calendarResource = _persistence.create(pk); calendarResource.setUuid(RandomTestUtil.randomString()); calendarResource.setGroupId(RandomTestUtil.nextLong()); calendarResource.setCompanyId(RandomTestUtil.nextLong()); calendarResource.setUserId(RandomTestUtil.nextLong()); calendarResource.setUserName(RandomTestUtil.randomString()); calendarResource.setCreateDate(RandomTestUtil.nextDate()); calendarResource.setModifiedDate(RandomTestUtil.nextDate()); calendarResource.setResourceBlockId(RandomTestUtil.nextLong()); calendarResource.setClassNameId(RandomTestUtil.nextLong()); calendarResource.setClassPK(RandomTestUtil.nextLong()); calendarResource.setClassUuid(RandomTestUtil.randomString()); calendarResource.setCode(RandomTestUtil.randomString()); calendarResource.setName(RandomTestUtil.randomString()); calendarResource.setDescription(RandomTestUtil.randomString()); calendarResource.setActive(RandomTestUtil.randomBoolean()); calendarResource.setLastPublishDate(RandomTestUtil.nextDate()); _calendarResources.add(_persistence.update(calendarResource)); return calendarResource; }
protected JournalContentSearch addJournalContentSearch() throws Exception { long pk = RandomTestUtil.nextLong(); JournalContentSearch journalContentSearch = _persistence.create(pk); journalContentSearch.setGroupId(RandomTestUtil.nextLong()); journalContentSearch.setCompanyId(RandomTestUtil.nextLong()); journalContentSearch.setPrivateLayout(RandomTestUtil.randomBoolean()); journalContentSearch.setLayoutId(RandomTestUtil.nextLong()); journalContentSearch.setPortletId(RandomTestUtil.randomString()); journalContentSearch.setArticleId(RandomTestUtil.randomString()); _journalContentSearchs.add(_persistence.update(journalContentSearch)); return journalContentSearch; }
@Test public void testUpdateExisting() throws Exception { long pk = RandomTestUtil.nextLong(); JournalContentSearch newJournalContentSearch = _persistence.create(pk); newJournalContentSearch.setGroupId(RandomTestUtil.nextLong()); newJournalContentSearch.setCompanyId(RandomTestUtil.nextLong()); newJournalContentSearch.setPrivateLayout(RandomTestUtil.randomBoolean()); newJournalContentSearch.setLayoutId(RandomTestUtil.nextLong()); newJournalContentSearch.setPortletId(RandomTestUtil.randomString()); newJournalContentSearch.setArticleId(RandomTestUtil.randomString()); _journalContentSearchs.add(_persistence.update(newJournalContentSearch)); JournalContentSearch existingJournalContentSearch = _persistence.findByPrimaryKey(newJournalContentSearch.getPrimaryKey()); Assert.assertEquals( existingJournalContentSearch.getContentSearchId(), newJournalContentSearch.getContentSearchId()); Assert.assertEquals( existingJournalContentSearch.getGroupId(), newJournalContentSearch.getGroupId()); Assert.assertEquals( existingJournalContentSearch.getCompanyId(), newJournalContentSearch.getCompanyId()); Assert.assertEquals( existingJournalContentSearch.getPrivateLayout(), newJournalContentSearch.getPrivateLayout()); Assert.assertEquals( existingJournalContentSearch.getLayoutId(), newJournalContentSearch.getLayoutId()); Assert.assertEquals( existingJournalContentSearch.getPortletId(), newJournalContentSearch.getPortletId()); Assert.assertEquals( existingJournalContentSearch.getArticleId(), newJournalContentSearch.getArticleId()); }
@Test public void testUpdateExisting() throws Exception { long pk = RandomTestUtil.nextLong(); Contact newContact = _persistence.create(pk); newContact.setMvccVersion(RandomTestUtil.nextLong()); newContact.setCompanyId(RandomTestUtil.nextLong()); newContact.setUserId(RandomTestUtil.nextLong()); newContact.setUserName(RandomTestUtil.randomString()); newContact.setCreateDate(RandomTestUtil.nextDate()); newContact.setModifiedDate(RandomTestUtil.nextDate()); newContact.setClassNameId(RandomTestUtil.nextLong()); newContact.setClassPK(RandomTestUtil.nextLong()); newContact.setAccountId(RandomTestUtil.nextLong()); newContact.setParentContactId(RandomTestUtil.nextLong()); newContact.setEmailAddress(RandomTestUtil.randomString()); newContact.setFirstName(RandomTestUtil.randomString()); newContact.setMiddleName(RandomTestUtil.randomString()); newContact.setLastName(RandomTestUtil.randomString()); newContact.setPrefixId(RandomTestUtil.nextLong()); newContact.setSuffixId(RandomTestUtil.nextLong()); newContact.setMale(RandomTestUtil.randomBoolean()); newContact.setBirthday(RandomTestUtil.nextDate()); newContact.setSmsSn(RandomTestUtil.randomString()); newContact.setFacebookSn(RandomTestUtil.randomString()); newContact.setJabberSn(RandomTestUtil.randomString()); newContact.setSkypeSn(RandomTestUtil.randomString()); newContact.setTwitterSn(RandomTestUtil.randomString()); newContact.setEmployeeStatusId(RandomTestUtil.randomString()); newContact.setEmployeeNumber(RandomTestUtil.randomString()); newContact.setJobTitle(RandomTestUtil.randomString()); newContact.setJobClass(RandomTestUtil.randomString()); newContact.setHoursOfOperation(RandomTestUtil.randomString()); _contacts.add(_persistence.update(newContact)); Contact existingContact = _persistence.findByPrimaryKey(newContact.getPrimaryKey()); Assert.assertEquals(existingContact.getMvccVersion(), newContact.getMvccVersion()); Assert.assertEquals(existingContact.getContactId(), newContact.getContactId()); Assert.assertEquals(existingContact.getCompanyId(), newContact.getCompanyId()); Assert.assertEquals(existingContact.getUserId(), newContact.getUserId()); Assert.assertEquals(existingContact.getUserName(), newContact.getUserName()); Assert.assertEquals( Time.getShortTimestamp(existingContact.getCreateDate()), Time.getShortTimestamp(newContact.getCreateDate())); Assert.assertEquals( Time.getShortTimestamp(existingContact.getModifiedDate()), Time.getShortTimestamp(newContact.getModifiedDate())); Assert.assertEquals(existingContact.getClassNameId(), newContact.getClassNameId()); Assert.assertEquals(existingContact.getClassPK(), newContact.getClassPK()); Assert.assertEquals(existingContact.getAccountId(), newContact.getAccountId()); Assert.assertEquals(existingContact.getParentContactId(), newContact.getParentContactId()); Assert.assertEquals(existingContact.getEmailAddress(), newContact.getEmailAddress()); Assert.assertEquals(existingContact.getFirstName(), newContact.getFirstName()); Assert.assertEquals(existingContact.getMiddleName(), newContact.getMiddleName()); Assert.assertEquals(existingContact.getLastName(), newContact.getLastName()); Assert.assertEquals(existingContact.getPrefixId(), newContact.getPrefixId()); Assert.assertEquals(existingContact.getSuffixId(), newContact.getSuffixId()); Assert.assertEquals(existingContact.getMale(), newContact.getMale()); Assert.assertEquals( Time.getShortTimestamp(existingContact.getBirthday()), Time.getShortTimestamp(newContact.getBirthday())); Assert.assertEquals(existingContact.getSmsSn(), newContact.getSmsSn()); Assert.assertEquals(existingContact.getFacebookSn(), newContact.getFacebookSn()); Assert.assertEquals(existingContact.getJabberSn(), newContact.getJabberSn()); Assert.assertEquals(existingContact.getSkypeSn(), newContact.getSkypeSn()); Assert.assertEquals(existingContact.getTwitterSn(), newContact.getTwitterSn()); Assert.assertEquals(existingContact.getEmployeeStatusId(), newContact.getEmployeeStatusId()); Assert.assertEquals(existingContact.getEmployeeNumber(), newContact.getEmployeeNumber()); Assert.assertEquals(existingContact.getJobTitle(), newContact.getJobTitle()); Assert.assertEquals(existingContact.getJobClass(), newContact.getJobClass()); Assert.assertEquals(existingContact.getHoursOfOperation(), newContact.getHoursOfOperation()); }
@Test public void testUpdateExisting() throws Exception { long pk = RandomTestUtil.nextLong(); Calendar newCalendar = _persistence.create(pk); newCalendar.setUuid(RandomTestUtil.randomString()); newCalendar.setGroupId(RandomTestUtil.nextLong()); newCalendar.setCompanyId(RandomTestUtil.nextLong()); newCalendar.setUserId(RandomTestUtil.nextLong()); newCalendar.setUserName(RandomTestUtil.randomString()); newCalendar.setCreateDate(RandomTestUtil.nextDate()); newCalendar.setModifiedDate(RandomTestUtil.nextDate()); newCalendar.setResourceBlockId(RandomTestUtil.nextLong()); newCalendar.setCalendarResourceId(RandomTestUtil.nextLong()); newCalendar.setName(RandomTestUtil.randomString()); newCalendar.setDescription(RandomTestUtil.randomString()); newCalendar.setTimeZoneId(RandomTestUtil.randomString()); newCalendar.setColor(RandomTestUtil.nextInt()); newCalendar.setDefaultCalendar(RandomTestUtil.randomBoolean()); newCalendar.setEnableComments(RandomTestUtil.randomBoolean()); newCalendar.setEnableRatings(RandomTestUtil.randomBoolean()); newCalendar.setLastPublishDate(RandomTestUtil.nextDate()); _calendars.add(_persistence.update(newCalendar)); Calendar existingCalendar = _persistence.findByPrimaryKey(newCalendar.getPrimaryKey()); Assert.assertEquals(existingCalendar.getUuid(), newCalendar.getUuid()); Assert.assertEquals(existingCalendar.getCalendarId(), newCalendar.getCalendarId()); Assert.assertEquals(existingCalendar.getGroupId(), newCalendar.getGroupId()); Assert.assertEquals(existingCalendar.getCompanyId(), newCalendar.getCompanyId()); Assert.assertEquals(existingCalendar.getUserId(), newCalendar.getUserId()); Assert.assertEquals(existingCalendar.getUserName(), newCalendar.getUserName()); Assert.assertEquals( Time.getShortTimestamp(existingCalendar.getCreateDate()), Time.getShortTimestamp(newCalendar.getCreateDate())); Assert.assertEquals( Time.getShortTimestamp(existingCalendar.getModifiedDate()), Time.getShortTimestamp(newCalendar.getModifiedDate())); Assert.assertEquals(existingCalendar.getResourceBlockId(), newCalendar.getResourceBlockId()); Assert.assertEquals( existingCalendar.getCalendarResourceId(), newCalendar.getCalendarResourceId()); Assert.assertEquals(existingCalendar.getName(), newCalendar.getName()); Assert.assertEquals(existingCalendar.getDescription(), newCalendar.getDescription()); Assert.assertEquals(existingCalendar.getTimeZoneId(), newCalendar.getTimeZoneId()); Assert.assertEquals(existingCalendar.getColor(), newCalendar.getColor()); Assert.assertEquals(existingCalendar.getDefaultCalendar(), newCalendar.getDefaultCalendar()); Assert.assertEquals(existingCalendar.getEnableComments(), newCalendar.getEnableComments()); Assert.assertEquals(existingCalendar.getEnableRatings(), newCalendar.getEnableRatings()); Assert.assertEquals( Time.getShortTimestamp(existingCalendar.getLastPublishDate()), Time.getShortTimestamp(newCalendar.getLastPublishDate())); }
@Test public void testCountByActive() throws Exception { _persistence.countByActive(RandomTestUtil.randomBoolean()); _persistence.countByActive(RandomTestUtil.randomBoolean()); }
@Test public void testUpdateExisting() throws Exception { long pk = RandomTestUtil.nextLong(); CalendarResource newCalendarResource = _persistence.create(pk); newCalendarResource.setUuid(RandomTestUtil.randomString()); newCalendarResource.setGroupId(RandomTestUtil.nextLong()); newCalendarResource.setCompanyId(RandomTestUtil.nextLong()); newCalendarResource.setUserId(RandomTestUtil.nextLong()); newCalendarResource.setUserName(RandomTestUtil.randomString()); newCalendarResource.setCreateDate(RandomTestUtil.nextDate()); newCalendarResource.setModifiedDate(RandomTestUtil.nextDate()); newCalendarResource.setResourceBlockId(RandomTestUtil.nextLong()); newCalendarResource.setClassNameId(RandomTestUtil.nextLong()); newCalendarResource.setClassPK(RandomTestUtil.nextLong()); newCalendarResource.setClassUuid(RandomTestUtil.randomString()); newCalendarResource.setCode(RandomTestUtil.randomString()); newCalendarResource.setName(RandomTestUtil.randomString()); newCalendarResource.setDescription(RandomTestUtil.randomString()); newCalendarResource.setActive(RandomTestUtil.randomBoolean()); newCalendarResource.setLastPublishDate(RandomTestUtil.nextDate()); _calendarResources.add(_persistence.update(newCalendarResource)); CalendarResource existingCalendarResource = _persistence.findByPrimaryKey(newCalendarResource.getPrimaryKey()); Assert.assertEquals(existingCalendarResource.getUuid(), newCalendarResource.getUuid()); Assert.assertEquals( existingCalendarResource.getCalendarResourceId(), newCalendarResource.getCalendarResourceId()); Assert.assertEquals(existingCalendarResource.getGroupId(), newCalendarResource.getGroupId()); Assert.assertEquals( existingCalendarResource.getCompanyId(), newCalendarResource.getCompanyId()); Assert.assertEquals(existingCalendarResource.getUserId(), newCalendarResource.getUserId()); Assert.assertEquals(existingCalendarResource.getUserName(), newCalendarResource.getUserName()); Assert.assertEquals( Time.getShortTimestamp(existingCalendarResource.getCreateDate()), Time.getShortTimestamp(newCalendarResource.getCreateDate())); Assert.assertEquals( Time.getShortTimestamp(existingCalendarResource.getModifiedDate()), Time.getShortTimestamp(newCalendarResource.getModifiedDate())); Assert.assertEquals( existingCalendarResource.getResourceBlockId(), newCalendarResource.getResourceBlockId()); Assert.assertEquals( existingCalendarResource.getClassNameId(), newCalendarResource.getClassNameId()); Assert.assertEquals(existingCalendarResource.getClassPK(), newCalendarResource.getClassPK()); Assert.assertEquals( existingCalendarResource.getClassUuid(), newCalendarResource.getClassUuid()); Assert.assertEquals(existingCalendarResource.getCode(), newCalendarResource.getCode()); Assert.assertEquals(existingCalendarResource.getName(), newCalendarResource.getName()); Assert.assertEquals( existingCalendarResource.getDescription(), newCalendarResource.getDescription()); Assert.assertEquals(existingCalendarResource.getActive(), newCalendarResource.getActive()); Assert.assertEquals( Time.getShortTimestamp(existingCalendarResource.getLastPublishDate()), Time.getShortTimestamp(newCalendarResource.getLastPublishDate())); }
@Test public void testUpdateExisting() throws Exception { long pk = RandomTestUtil.nextLong(); LayoutSet newLayoutSet = _persistence.create(pk); newLayoutSet.setMvccVersion(RandomTestUtil.nextLong()); newLayoutSet.setGroupId(RandomTestUtil.nextLong()); newLayoutSet.setCompanyId(RandomTestUtil.nextLong()); newLayoutSet.setCreateDate(RandomTestUtil.nextDate()); newLayoutSet.setModifiedDate(RandomTestUtil.nextDate()); newLayoutSet.setPrivateLayout(RandomTestUtil.randomBoolean()); newLayoutSet.setLogoId(RandomTestUtil.nextLong()); newLayoutSet.setThemeId(RandomTestUtil.randomString()); newLayoutSet.setColorSchemeId(RandomTestUtil.randomString()); newLayoutSet.setWapThemeId(RandomTestUtil.randomString()); newLayoutSet.setWapColorSchemeId(RandomTestUtil.randomString()); newLayoutSet.setCss(RandomTestUtil.randomString()); newLayoutSet.setPageCount(RandomTestUtil.nextInt()); newLayoutSet.setSettings(RandomTestUtil.randomString()); newLayoutSet.setLayoutSetPrototypeUuid(RandomTestUtil.randomString()); newLayoutSet.setLayoutSetPrototypeLinkEnabled(RandomTestUtil.randomBoolean()); _layoutSets.add(_persistence.update(newLayoutSet)); LayoutSet existingLayoutSet = _persistence.findByPrimaryKey(newLayoutSet.getPrimaryKey()); Assert.assertEquals(existingLayoutSet.getMvccVersion(), newLayoutSet.getMvccVersion()); Assert.assertEquals(existingLayoutSet.getLayoutSetId(), newLayoutSet.getLayoutSetId()); Assert.assertEquals(existingLayoutSet.getGroupId(), newLayoutSet.getGroupId()); Assert.assertEquals(existingLayoutSet.getCompanyId(), newLayoutSet.getCompanyId()); Assert.assertEquals( Time.getShortTimestamp(existingLayoutSet.getCreateDate()), Time.getShortTimestamp(newLayoutSet.getCreateDate())); Assert.assertEquals( Time.getShortTimestamp(existingLayoutSet.getModifiedDate()), Time.getShortTimestamp(newLayoutSet.getModifiedDate())); Assert.assertEquals(existingLayoutSet.getPrivateLayout(), newLayoutSet.getPrivateLayout()); Assert.assertEquals(existingLayoutSet.getLogoId(), newLayoutSet.getLogoId()); Assert.assertEquals(existingLayoutSet.getThemeId(), newLayoutSet.getThemeId()); Assert.assertEquals(existingLayoutSet.getColorSchemeId(), newLayoutSet.getColorSchemeId()); Assert.assertEquals(existingLayoutSet.getWapThemeId(), newLayoutSet.getWapThemeId()); Assert.assertEquals( existingLayoutSet.getWapColorSchemeId(), newLayoutSet.getWapColorSchemeId()); Assert.assertEquals(existingLayoutSet.getCss(), newLayoutSet.getCss()); Assert.assertEquals(existingLayoutSet.getPageCount(), newLayoutSet.getPageCount()); Assert.assertEquals(existingLayoutSet.getSettings(), newLayoutSet.getSettings()); Assert.assertEquals( existingLayoutSet.getLayoutSetPrototypeUuid(), newLayoutSet.getLayoutSetPrototypeUuid()); Assert.assertEquals( existingLayoutSet.getLayoutSetPrototypeLinkEnabled(), newLayoutSet.getLayoutSetPrototypeLinkEnabled()); }
@Test public void testUpdateExisting() throws Exception { long pk = RandomTestUtil.nextLong(); Address newAddress = _persistence.create(pk); newAddress.setMvccVersion(RandomTestUtil.nextLong()); newAddress.setUuid(RandomTestUtil.randomString()); newAddress.setCompanyId(RandomTestUtil.nextLong()); newAddress.setUserId(RandomTestUtil.nextLong()); newAddress.setUserName(RandomTestUtil.randomString()); newAddress.setCreateDate(RandomTestUtil.nextDate()); newAddress.setModifiedDate(RandomTestUtil.nextDate()); newAddress.setClassNameId(RandomTestUtil.nextLong()); newAddress.setClassPK(RandomTestUtil.nextLong()); newAddress.setStreet1(RandomTestUtil.randomString()); newAddress.setStreet2(RandomTestUtil.randomString()); newAddress.setStreet3(RandomTestUtil.randomString()); newAddress.setCity(RandomTestUtil.randomString()); newAddress.setZip(RandomTestUtil.randomString()); newAddress.setRegionId(RandomTestUtil.nextLong()); newAddress.setCountryId(RandomTestUtil.nextLong()); newAddress.setTypeId(RandomTestUtil.nextLong()); newAddress.setMailing(RandomTestUtil.randomBoolean()); newAddress.setPrimary(RandomTestUtil.randomBoolean()); newAddress.setLastPublishDate(RandomTestUtil.nextDate()); _addresses.add(_persistence.update(newAddress)); Address existingAddress = _persistence.findByPrimaryKey(newAddress.getPrimaryKey()); Assert.assertEquals(existingAddress.getMvccVersion(), newAddress.getMvccVersion()); Assert.assertEquals(existingAddress.getUuid(), newAddress.getUuid()); Assert.assertEquals(existingAddress.getAddressId(), newAddress.getAddressId()); Assert.assertEquals(existingAddress.getCompanyId(), newAddress.getCompanyId()); Assert.assertEquals(existingAddress.getUserId(), newAddress.getUserId()); Assert.assertEquals(existingAddress.getUserName(), newAddress.getUserName()); Assert.assertEquals( Time.getShortTimestamp(existingAddress.getCreateDate()), Time.getShortTimestamp(newAddress.getCreateDate())); Assert.assertEquals( Time.getShortTimestamp(existingAddress.getModifiedDate()), Time.getShortTimestamp(newAddress.getModifiedDate())); Assert.assertEquals(existingAddress.getClassNameId(), newAddress.getClassNameId()); Assert.assertEquals(existingAddress.getClassPK(), newAddress.getClassPK()); Assert.assertEquals(existingAddress.getStreet1(), newAddress.getStreet1()); Assert.assertEquals(existingAddress.getStreet2(), newAddress.getStreet2()); Assert.assertEquals(existingAddress.getStreet3(), newAddress.getStreet3()); Assert.assertEquals(existingAddress.getCity(), newAddress.getCity()); Assert.assertEquals(existingAddress.getZip(), newAddress.getZip()); Assert.assertEquals(existingAddress.getRegionId(), newAddress.getRegionId()); Assert.assertEquals(existingAddress.getCountryId(), newAddress.getCountryId()); Assert.assertEquals(existingAddress.getTypeId(), newAddress.getTypeId()); Assert.assertEquals(existingAddress.getMailing(), newAddress.getMailing()); Assert.assertEquals(existingAddress.getPrimary(), newAddress.getPrimary()); Assert.assertEquals( Time.getShortTimestamp(existingAddress.getLastPublishDate()), Time.getShortTimestamp(newAddress.getLastPublishDate())); }
@Test public void testUpdateExisting() throws Exception { long pk = RandomTestUtil.nextLong(); ShoppingOrder newShoppingOrder = _persistence.create(pk); newShoppingOrder.setGroupId(RandomTestUtil.nextLong()); newShoppingOrder.setCompanyId(RandomTestUtil.nextLong()); newShoppingOrder.setUserId(RandomTestUtil.nextLong()); newShoppingOrder.setUserName(RandomTestUtil.randomString()); newShoppingOrder.setCreateDate(RandomTestUtil.nextDate()); newShoppingOrder.setModifiedDate(RandomTestUtil.nextDate()); newShoppingOrder.setNumber(RandomTestUtil.randomString()); newShoppingOrder.setTax(RandomTestUtil.nextDouble()); newShoppingOrder.setShipping(RandomTestUtil.nextDouble()); newShoppingOrder.setAltShipping(RandomTestUtil.randomString()); newShoppingOrder.setRequiresShipping(RandomTestUtil.randomBoolean()); newShoppingOrder.setInsure(RandomTestUtil.randomBoolean()); newShoppingOrder.setInsurance(RandomTestUtil.nextDouble()); newShoppingOrder.setCouponCodes(RandomTestUtil.randomString()); newShoppingOrder.setCouponDiscount(RandomTestUtil.nextDouble()); newShoppingOrder.setBillingFirstName(RandomTestUtil.randomString()); newShoppingOrder.setBillingLastName(RandomTestUtil.randomString()); newShoppingOrder.setBillingEmailAddress(RandomTestUtil.randomString()); newShoppingOrder.setBillingCompany(RandomTestUtil.randomString()); newShoppingOrder.setBillingStreet(RandomTestUtil.randomString()); newShoppingOrder.setBillingCity(RandomTestUtil.randomString()); newShoppingOrder.setBillingState(RandomTestUtil.randomString()); newShoppingOrder.setBillingZip(RandomTestUtil.randomString()); newShoppingOrder.setBillingCountry(RandomTestUtil.randomString()); newShoppingOrder.setBillingPhone(RandomTestUtil.randomString()); newShoppingOrder.setShipToBilling(RandomTestUtil.randomBoolean()); newShoppingOrder.setShippingFirstName(RandomTestUtil.randomString()); newShoppingOrder.setShippingLastName(RandomTestUtil.randomString()); newShoppingOrder.setShippingEmailAddress(RandomTestUtil.randomString()); newShoppingOrder.setShippingCompany(RandomTestUtil.randomString()); newShoppingOrder.setShippingStreet(RandomTestUtil.randomString()); newShoppingOrder.setShippingCity(RandomTestUtil.randomString()); newShoppingOrder.setShippingState(RandomTestUtil.randomString()); newShoppingOrder.setShippingZip(RandomTestUtil.randomString()); newShoppingOrder.setShippingCountry(RandomTestUtil.randomString()); newShoppingOrder.setShippingPhone(RandomTestUtil.randomString()); newShoppingOrder.setCcName(RandomTestUtil.randomString()); newShoppingOrder.setCcType(RandomTestUtil.randomString()); newShoppingOrder.setCcNumber(RandomTestUtil.randomString()); newShoppingOrder.setCcExpMonth(RandomTestUtil.nextInt()); newShoppingOrder.setCcExpYear(RandomTestUtil.nextInt()); newShoppingOrder.setCcVerNumber(RandomTestUtil.randomString()); newShoppingOrder.setComments(RandomTestUtil.randomString()); newShoppingOrder.setPpTxnId(RandomTestUtil.randomString()); newShoppingOrder.setPpPaymentStatus(RandomTestUtil.randomString()); newShoppingOrder.setPpPaymentGross(RandomTestUtil.nextDouble()); newShoppingOrder.setPpReceiverEmail(RandomTestUtil.randomString()); newShoppingOrder.setPpPayerEmail(RandomTestUtil.randomString()); newShoppingOrder.setSendOrderEmail(RandomTestUtil.randomBoolean()); newShoppingOrder.setSendShippingEmail(RandomTestUtil.randomBoolean()); _shoppingOrders.add(_persistence.update(newShoppingOrder)); ShoppingOrder existingShoppingOrder = _persistence.findByPrimaryKey(newShoppingOrder.getPrimaryKey()); Assert.assertEquals(existingShoppingOrder.getOrderId(), newShoppingOrder.getOrderId()); Assert.assertEquals(existingShoppingOrder.getGroupId(), newShoppingOrder.getGroupId()); Assert.assertEquals(existingShoppingOrder.getCompanyId(), newShoppingOrder.getCompanyId()); Assert.assertEquals(existingShoppingOrder.getUserId(), newShoppingOrder.getUserId()); Assert.assertEquals(existingShoppingOrder.getUserName(), newShoppingOrder.getUserName()); Assert.assertEquals( Time.getShortTimestamp(existingShoppingOrder.getCreateDate()), Time.getShortTimestamp(newShoppingOrder.getCreateDate())); Assert.assertEquals( Time.getShortTimestamp(existingShoppingOrder.getModifiedDate()), Time.getShortTimestamp(newShoppingOrder.getModifiedDate())); Assert.assertEquals(existingShoppingOrder.getNumber(), newShoppingOrder.getNumber()); AssertUtils.assertEquals(existingShoppingOrder.getTax(), newShoppingOrder.getTax()); AssertUtils.assertEquals(existingShoppingOrder.getShipping(), newShoppingOrder.getShipping()); Assert.assertEquals(existingShoppingOrder.getAltShipping(), newShoppingOrder.getAltShipping()); Assert.assertEquals( existingShoppingOrder.getRequiresShipping(), newShoppingOrder.getRequiresShipping()); Assert.assertEquals(existingShoppingOrder.getInsure(), newShoppingOrder.getInsure()); AssertUtils.assertEquals(existingShoppingOrder.getInsurance(), newShoppingOrder.getInsurance()); Assert.assertEquals(existingShoppingOrder.getCouponCodes(), newShoppingOrder.getCouponCodes()); AssertUtils.assertEquals( existingShoppingOrder.getCouponDiscount(), newShoppingOrder.getCouponDiscount()); Assert.assertEquals( existingShoppingOrder.getBillingFirstName(), newShoppingOrder.getBillingFirstName()); Assert.assertEquals( existingShoppingOrder.getBillingLastName(), newShoppingOrder.getBillingLastName()); Assert.assertEquals( existingShoppingOrder.getBillingEmailAddress(), newShoppingOrder.getBillingEmailAddress()); Assert.assertEquals( existingShoppingOrder.getBillingCompany(), newShoppingOrder.getBillingCompany()); Assert.assertEquals( existingShoppingOrder.getBillingStreet(), newShoppingOrder.getBillingStreet()); Assert.assertEquals(existingShoppingOrder.getBillingCity(), newShoppingOrder.getBillingCity()); Assert.assertEquals( existingShoppingOrder.getBillingState(), newShoppingOrder.getBillingState()); Assert.assertEquals(existingShoppingOrder.getBillingZip(), newShoppingOrder.getBillingZip()); Assert.assertEquals( existingShoppingOrder.getBillingCountry(), newShoppingOrder.getBillingCountry()); Assert.assertEquals( existingShoppingOrder.getBillingPhone(), newShoppingOrder.getBillingPhone()); Assert.assertEquals( existingShoppingOrder.getShipToBilling(), newShoppingOrder.getShipToBilling()); Assert.assertEquals( existingShoppingOrder.getShippingFirstName(), newShoppingOrder.getShippingFirstName()); Assert.assertEquals( existingShoppingOrder.getShippingLastName(), newShoppingOrder.getShippingLastName()); Assert.assertEquals( existingShoppingOrder.getShippingEmailAddress(), newShoppingOrder.getShippingEmailAddress()); Assert.assertEquals( existingShoppingOrder.getShippingCompany(), newShoppingOrder.getShippingCompany()); Assert.assertEquals( existingShoppingOrder.getShippingStreet(), newShoppingOrder.getShippingStreet()); Assert.assertEquals( existingShoppingOrder.getShippingCity(), newShoppingOrder.getShippingCity()); Assert.assertEquals( existingShoppingOrder.getShippingState(), newShoppingOrder.getShippingState()); Assert.assertEquals(existingShoppingOrder.getShippingZip(), newShoppingOrder.getShippingZip()); Assert.assertEquals( existingShoppingOrder.getShippingCountry(), newShoppingOrder.getShippingCountry()); Assert.assertEquals( existingShoppingOrder.getShippingPhone(), newShoppingOrder.getShippingPhone()); Assert.assertEquals(existingShoppingOrder.getCcName(), newShoppingOrder.getCcName()); Assert.assertEquals(existingShoppingOrder.getCcType(), newShoppingOrder.getCcType()); Assert.assertEquals(existingShoppingOrder.getCcNumber(), newShoppingOrder.getCcNumber()); Assert.assertEquals(existingShoppingOrder.getCcExpMonth(), newShoppingOrder.getCcExpMonth()); Assert.assertEquals(existingShoppingOrder.getCcExpYear(), newShoppingOrder.getCcExpYear()); Assert.assertEquals(existingShoppingOrder.getCcVerNumber(), newShoppingOrder.getCcVerNumber()); Assert.assertEquals(existingShoppingOrder.getComments(), newShoppingOrder.getComments()); Assert.assertEquals(existingShoppingOrder.getPpTxnId(), newShoppingOrder.getPpTxnId()); Assert.assertEquals( existingShoppingOrder.getPpPaymentStatus(), newShoppingOrder.getPpPaymentStatus()); AssertUtils.assertEquals( existingShoppingOrder.getPpPaymentGross(), newShoppingOrder.getPpPaymentGross()); Assert.assertEquals( existingShoppingOrder.getPpReceiverEmail(), newShoppingOrder.getPpReceiverEmail()); Assert.assertEquals( existingShoppingOrder.getPpPayerEmail(), newShoppingOrder.getPpPayerEmail()); Assert.assertEquals( existingShoppingOrder.getSendOrderEmail(), newShoppingOrder.getSendOrderEmail()); Assert.assertEquals( existingShoppingOrder.getSendShippingEmail(), newShoppingOrder.getSendShippingEmail()); }
protected ShoppingOrder addShoppingOrder() throws Exception { long pk = RandomTestUtil.nextLong(); ShoppingOrder shoppingOrder = _persistence.create(pk); shoppingOrder.setGroupId(RandomTestUtil.nextLong()); shoppingOrder.setCompanyId(RandomTestUtil.nextLong()); shoppingOrder.setUserId(RandomTestUtil.nextLong()); shoppingOrder.setUserName(RandomTestUtil.randomString()); shoppingOrder.setCreateDate(RandomTestUtil.nextDate()); shoppingOrder.setModifiedDate(RandomTestUtil.nextDate()); shoppingOrder.setNumber(RandomTestUtil.randomString()); shoppingOrder.setTax(RandomTestUtil.nextDouble()); shoppingOrder.setShipping(RandomTestUtil.nextDouble()); shoppingOrder.setAltShipping(RandomTestUtil.randomString()); shoppingOrder.setRequiresShipping(RandomTestUtil.randomBoolean()); shoppingOrder.setInsure(RandomTestUtil.randomBoolean()); shoppingOrder.setInsurance(RandomTestUtil.nextDouble()); shoppingOrder.setCouponCodes(RandomTestUtil.randomString()); shoppingOrder.setCouponDiscount(RandomTestUtil.nextDouble()); shoppingOrder.setBillingFirstName(RandomTestUtil.randomString()); shoppingOrder.setBillingLastName(RandomTestUtil.randomString()); shoppingOrder.setBillingEmailAddress(RandomTestUtil.randomString()); shoppingOrder.setBillingCompany(RandomTestUtil.randomString()); shoppingOrder.setBillingStreet(RandomTestUtil.randomString()); shoppingOrder.setBillingCity(RandomTestUtil.randomString()); shoppingOrder.setBillingState(RandomTestUtil.randomString()); shoppingOrder.setBillingZip(RandomTestUtil.randomString()); shoppingOrder.setBillingCountry(RandomTestUtil.randomString()); shoppingOrder.setBillingPhone(RandomTestUtil.randomString()); shoppingOrder.setShipToBilling(RandomTestUtil.randomBoolean()); shoppingOrder.setShippingFirstName(RandomTestUtil.randomString()); shoppingOrder.setShippingLastName(RandomTestUtil.randomString()); shoppingOrder.setShippingEmailAddress(RandomTestUtil.randomString()); shoppingOrder.setShippingCompany(RandomTestUtil.randomString()); shoppingOrder.setShippingStreet(RandomTestUtil.randomString()); shoppingOrder.setShippingCity(RandomTestUtil.randomString()); shoppingOrder.setShippingState(RandomTestUtil.randomString()); shoppingOrder.setShippingZip(RandomTestUtil.randomString()); shoppingOrder.setShippingCountry(RandomTestUtil.randomString()); shoppingOrder.setShippingPhone(RandomTestUtil.randomString()); shoppingOrder.setCcName(RandomTestUtil.randomString()); shoppingOrder.setCcType(RandomTestUtil.randomString()); shoppingOrder.setCcNumber(RandomTestUtil.randomString()); shoppingOrder.setCcExpMonth(RandomTestUtil.nextInt()); shoppingOrder.setCcExpYear(RandomTestUtil.nextInt()); shoppingOrder.setCcVerNumber(RandomTestUtil.randomString()); shoppingOrder.setComments(RandomTestUtil.randomString()); shoppingOrder.setPpTxnId(RandomTestUtil.randomString()); shoppingOrder.setPpPaymentStatus(RandomTestUtil.randomString()); shoppingOrder.setPpPaymentGross(RandomTestUtil.nextDouble()); shoppingOrder.setPpReceiverEmail(RandomTestUtil.randomString()); shoppingOrder.setPpPayerEmail(RandomTestUtil.randomString()); shoppingOrder.setSendOrderEmail(RandomTestUtil.randomBoolean()); shoppingOrder.setSendShippingEmail(RandomTestUtil.randomBoolean()); _shoppingOrders.add(_persistence.update(shoppingOrder)); return shoppingOrder; }
@Test public void testUpdateExisting() throws Exception { long pk = RandomTestUtil.nextLong(); MBMailingList newMBMailingList = _persistence.create(pk); newMBMailingList.setUuid(RandomTestUtil.randomString()); newMBMailingList.setGroupId(RandomTestUtil.nextLong()); newMBMailingList.setCompanyId(RandomTestUtil.nextLong()); newMBMailingList.setUserId(RandomTestUtil.nextLong()); newMBMailingList.setUserName(RandomTestUtil.randomString()); newMBMailingList.setCreateDate(RandomTestUtil.nextDate()); newMBMailingList.setModifiedDate(RandomTestUtil.nextDate()); newMBMailingList.setCategoryId(RandomTestUtil.nextLong()); newMBMailingList.setEmailAddress(RandomTestUtil.randomString()); newMBMailingList.setInProtocol(RandomTestUtil.randomString()); newMBMailingList.setInServerName(RandomTestUtil.randomString()); newMBMailingList.setInServerPort(RandomTestUtil.nextInt()); newMBMailingList.setInUseSSL(RandomTestUtil.randomBoolean()); newMBMailingList.setInUserName(RandomTestUtil.randomString()); newMBMailingList.setInPassword(RandomTestUtil.randomString()); newMBMailingList.setInReadInterval(RandomTestUtil.nextInt()); newMBMailingList.setOutEmailAddress(RandomTestUtil.randomString()); newMBMailingList.setOutCustom(RandomTestUtil.randomBoolean()); newMBMailingList.setOutServerName(RandomTestUtil.randomString()); newMBMailingList.setOutServerPort(RandomTestUtil.nextInt()); newMBMailingList.setOutUseSSL(RandomTestUtil.randomBoolean()); newMBMailingList.setOutUserName(RandomTestUtil.randomString()); newMBMailingList.setOutPassword(RandomTestUtil.randomString()); newMBMailingList.setAllowAnonymous(RandomTestUtil.randomBoolean()); newMBMailingList.setActive(RandomTestUtil.randomBoolean()); _mbMailingLists.add(_persistence.update(newMBMailingList)); MBMailingList existingMBMailingList = _persistence.findByPrimaryKey(newMBMailingList.getPrimaryKey()); Assert.assertEquals(existingMBMailingList.getUuid(), newMBMailingList.getUuid()); Assert.assertEquals( existingMBMailingList.getMailingListId(), newMBMailingList.getMailingListId()); Assert.assertEquals(existingMBMailingList.getGroupId(), newMBMailingList.getGroupId()); Assert.assertEquals(existingMBMailingList.getCompanyId(), newMBMailingList.getCompanyId()); Assert.assertEquals(existingMBMailingList.getUserId(), newMBMailingList.getUserId()); Assert.assertEquals(existingMBMailingList.getUserName(), newMBMailingList.getUserName()); Assert.assertEquals( Time.getShortTimestamp(existingMBMailingList.getCreateDate()), Time.getShortTimestamp(newMBMailingList.getCreateDate())); Assert.assertEquals( Time.getShortTimestamp(existingMBMailingList.getModifiedDate()), Time.getShortTimestamp(newMBMailingList.getModifiedDate())); Assert.assertEquals(existingMBMailingList.getCategoryId(), newMBMailingList.getCategoryId()); Assert.assertEquals( existingMBMailingList.getEmailAddress(), newMBMailingList.getEmailAddress()); Assert.assertEquals(existingMBMailingList.getInProtocol(), newMBMailingList.getInProtocol()); Assert.assertEquals( existingMBMailingList.getInServerName(), newMBMailingList.getInServerName()); Assert.assertEquals( existingMBMailingList.getInServerPort(), newMBMailingList.getInServerPort()); Assert.assertEquals(existingMBMailingList.getInUseSSL(), newMBMailingList.getInUseSSL()); Assert.assertEquals(existingMBMailingList.getInUserName(), newMBMailingList.getInUserName()); Assert.assertEquals(existingMBMailingList.getInPassword(), newMBMailingList.getInPassword()); Assert.assertEquals( existingMBMailingList.getInReadInterval(), newMBMailingList.getInReadInterval()); Assert.assertEquals( existingMBMailingList.getOutEmailAddress(), newMBMailingList.getOutEmailAddress()); Assert.assertEquals(existingMBMailingList.getOutCustom(), newMBMailingList.getOutCustom()); Assert.assertEquals( existingMBMailingList.getOutServerName(), newMBMailingList.getOutServerName()); Assert.assertEquals( existingMBMailingList.getOutServerPort(), newMBMailingList.getOutServerPort()); Assert.assertEquals(existingMBMailingList.getOutUseSSL(), newMBMailingList.getOutUseSSL()); Assert.assertEquals(existingMBMailingList.getOutUserName(), newMBMailingList.getOutUserName()); Assert.assertEquals(existingMBMailingList.getOutPassword(), newMBMailingList.getOutPassword()); Assert.assertEquals( existingMBMailingList.getAllowAnonymous(), newMBMailingList.getAllowAnonymous()); Assert.assertEquals(existingMBMailingList.getActive(), newMBMailingList.getActive()); }
@Test public void testUpdateExisting() throws Exception { long pk = RandomTestUtil.nextLong(); KaleoTaskInstanceToken newKaleoTaskInstanceToken = _persistence.create(pk); newKaleoTaskInstanceToken.setGroupId(RandomTestUtil.nextLong()); newKaleoTaskInstanceToken.setCompanyId(RandomTestUtil.nextLong()); newKaleoTaskInstanceToken.setUserId(RandomTestUtil.nextLong()); newKaleoTaskInstanceToken.setUserName(RandomTestUtil.randomString()); newKaleoTaskInstanceToken.setCreateDate(RandomTestUtil.nextDate()); newKaleoTaskInstanceToken.setModifiedDate(RandomTestUtil.nextDate()); newKaleoTaskInstanceToken.setKaleoDefinitionId(RandomTestUtil.nextLong()); newKaleoTaskInstanceToken.setKaleoInstanceId(RandomTestUtil.nextLong()); newKaleoTaskInstanceToken.setKaleoInstanceTokenId(RandomTestUtil.nextLong()); newKaleoTaskInstanceToken.setKaleoTaskId(RandomTestUtil.nextLong()); newKaleoTaskInstanceToken.setKaleoTaskName(RandomTestUtil.randomString()); newKaleoTaskInstanceToken.setClassName(RandomTestUtil.randomString()); newKaleoTaskInstanceToken.setClassPK(RandomTestUtil.nextLong()); newKaleoTaskInstanceToken.setCompletionUserId(RandomTestUtil.nextLong()); newKaleoTaskInstanceToken.setCompleted(RandomTestUtil.randomBoolean()); newKaleoTaskInstanceToken.setCompletionDate(RandomTestUtil.nextDate()); newKaleoTaskInstanceToken.setDueDate(RandomTestUtil.nextDate()); newKaleoTaskInstanceToken.setWorkflowContext(RandomTestUtil.randomString()); _kaleoTaskInstanceTokens.add(_persistence.update(newKaleoTaskInstanceToken)); KaleoTaskInstanceToken existingKaleoTaskInstanceToken = _persistence.findByPrimaryKey(newKaleoTaskInstanceToken.getPrimaryKey()); Assert.assertEquals( existingKaleoTaskInstanceToken.getKaleoTaskInstanceTokenId(), newKaleoTaskInstanceToken.getKaleoTaskInstanceTokenId()); Assert.assertEquals( existingKaleoTaskInstanceToken.getGroupId(), newKaleoTaskInstanceToken.getGroupId()); Assert.assertEquals( existingKaleoTaskInstanceToken.getCompanyId(), newKaleoTaskInstanceToken.getCompanyId()); Assert.assertEquals( existingKaleoTaskInstanceToken.getUserId(), newKaleoTaskInstanceToken.getUserId()); Assert.assertEquals( existingKaleoTaskInstanceToken.getUserName(), newKaleoTaskInstanceToken.getUserName()); Assert.assertEquals( Time.getShortTimestamp(existingKaleoTaskInstanceToken.getCreateDate()), Time.getShortTimestamp(newKaleoTaskInstanceToken.getCreateDate())); Assert.assertEquals( Time.getShortTimestamp(existingKaleoTaskInstanceToken.getModifiedDate()), Time.getShortTimestamp(newKaleoTaskInstanceToken.getModifiedDate())); Assert.assertEquals( existingKaleoTaskInstanceToken.getKaleoDefinitionId(), newKaleoTaskInstanceToken.getKaleoDefinitionId()); Assert.assertEquals( existingKaleoTaskInstanceToken.getKaleoInstanceId(), newKaleoTaskInstanceToken.getKaleoInstanceId()); Assert.assertEquals( existingKaleoTaskInstanceToken.getKaleoInstanceTokenId(), newKaleoTaskInstanceToken.getKaleoInstanceTokenId()); Assert.assertEquals( existingKaleoTaskInstanceToken.getKaleoTaskId(), newKaleoTaskInstanceToken.getKaleoTaskId()); Assert.assertEquals( existingKaleoTaskInstanceToken.getKaleoTaskName(), newKaleoTaskInstanceToken.getKaleoTaskName()); Assert.assertEquals( existingKaleoTaskInstanceToken.getClassName(), newKaleoTaskInstanceToken.getClassName()); Assert.assertEquals( existingKaleoTaskInstanceToken.getClassPK(), newKaleoTaskInstanceToken.getClassPK()); Assert.assertEquals( existingKaleoTaskInstanceToken.getCompletionUserId(), newKaleoTaskInstanceToken.getCompletionUserId()); Assert.assertEquals( existingKaleoTaskInstanceToken.getCompleted(), newKaleoTaskInstanceToken.getCompleted()); Assert.assertEquals( Time.getShortTimestamp(existingKaleoTaskInstanceToken.getCompletionDate()), Time.getShortTimestamp(newKaleoTaskInstanceToken.getCompletionDate())); Assert.assertEquals( Time.getShortTimestamp(existingKaleoTaskInstanceToken.getDueDate()), Time.getShortTimestamp(newKaleoTaskInstanceToken.getDueDate())); Assert.assertEquals( existingKaleoTaskInstanceToken.getWorkflowContext(), newKaleoTaskInstanceToken.getWorkflowContext()); }
protected DLFileEntry addDLFileEntry() throws Exception { long pk = RandomTestUtil.nextLong(); DLFileEntry dlFileEntry = _persistence.create(pk); dlFileEntry.setUuid(RandomTestUtil.randomString()); dlFileEntry.setGroupId(RandomTestUtil.nextLong()); dlFileEntry.setCompanyId(RandomTestUtil.nextLong()); dlFileEntry.setUserId(RandomTestUtil.nextLong()); dlFileEntry.setUserName(RandomTestUtil.randomString()); dlFileEntry.setCreateDate(RandomTestUtil.nextDate()); dlFileEntry.setModifiedDate(RandomTestUtil.nextDate()); dlFileEntry.setClassNameId(RandomTestUtil.nextLong()); dlFileEntry.setClassPK(RandomTestUtil.nextLong()); dlFileEntry.setRepositoryId(RandomTestUtil.nextLong()); dlFileEntry.setFolderId(RandomTestUtil.nextLong()); dlFileEntry.setTreePath(RandomTestUtil.randomString()); dlFileEntry.setName(RandomTestUtil.randomString()); dlFileEntry.setFileName(RandomTestUtil.randomString()); dlFileEntry.setExtension(RandomTestUtil.randomString()); dlFileEntry.setMimeType(RandomTestUtil.randomString()); dlFileEntry.setTitle(RandomTestUtil.randomString()); dlFileEntry.setDescription(RandomTestUtil.randomString()); dlFileEntry.setExtraSettings(RandomTestUtil.randomString()); dlFileEntry.setFileEntryTypeId(RandomTestUtil.nextLong()); dlFileEntry.setVersion(RandomTestUtil.randomString()); dlFileEntry.setSize(RandomTestUtil.nextLong()); dlFileEntry.setReadCount(RandomTestUtil.nextInt()); dlFileEntry.setSmallImageId(RandomTestUtil.nextLong()); dlFileEntry.setLargeImageId(RandomTestUtil.nextLong()); dlFileEntry.setCustom1ImageId(RandomTestUtil.nextLong()); dlFileEntry.setCustom2ImageId(RandomTestUtil.nextLong()); dlFileEntry.setManualCheckInRequired(RandomTestUtil.randomBoolean()); dlFileEntry.setLastPublishDate(RandomTestUtil.nextDate()); _dlFileEntries.add(_persistence.update(dlFileEntry)); return dlFileEntry; }
@Test public void testUpdateExisting() throws Exception { long pk = RandomTestUtil.nextLong(); DLFileEntry newDLFileEntry = _persistence.create(pk); newDLFileEntry.setUuid(RandomTestUtil.randomString()); newDLFileEntry.setGroupId(RandomTestUtil.nextLong()); newDLFileEntry.setCompanyId(RandomTestUtil.nextLong()); newDLFileEntry.setUserId(RandomTestUtil.nextLong()); newDLFileEntry.setUserName(RandomTestUtil.randomString()); newDLFileEntry.setCreateDate(RandomTestUtil.nextDate()); newDLFileEntry.setModifiedDate(RandomTestUtil.nextDate()); newDLFileEntry.setClassNameId(RandomTestUtil.nextLong()); newDLFileEntry.setClassPK(RandomTestUtil.nextLong()); newDLFileEntry.setRepositoryId(RandomTestUtil.nextLong()); newDLFileEntry.setFolderId(RandomTestUtil.nextLong()); newDLFileEntry.setTreePath(RandomTestUtil.randomString()); newDLFileEntry.setName(RandomTestUtil.randomString()); newDLFileEntry.setFileName(RandomTestUtil.randomString()); newDLFileEntry.setExtension(RandomTestUtil.randomString()); newDLFileEntry.setMimeType(RandomTestUtil.randomString()); newDLFileEntry.setTitle(RandomTestUtil.randomString()); newDLFileEntry.setDescription(RandomTestUtil.randomString()); newDLFileEntry.setExtraSettings(RandomTestUtil.randomString()); newDLFileEntry.setFileEntryTypeId(RandomTestUtil.nextLong()); newDLFileEntry.setVersion(RandomTestUtil.randomString()); newDLFileEntry.setSize(RandomTestUtil.nextLong()); newDLFileEntry.setReadCount(RandomTestUtil.nextInt()); newDLFileEntry.setSmallImageId(RandomTestUtil.nextLong()); newDLFileEntry.setLargeImageId(RandomTestUtil.nextLong()); newDLFileEntry.setCustom1ImageId(RandomTestUtil.nextLong()); newDLFileEntry.setCustom2ImageId(RandomTestUtil.nextLong()); newDLFileEntry.setManualCheckInRequired(RandomTestUtil.randomBoolean()); newDLFileEntry.setLastPublishDate(RandomTestUtil.nextDate()); _dlFileEntries.add(_persistence.update(newDLFileEntry)); DLFileEntry existingDLFileEntry = _persistence.findByPrimaryKey(newDLFileEntry.getPrimaryKey()); Assert.assertEquals(existingDLFileEntry.getUuid(), newDLFileEntry.getUuid()); Assert.assertEquals(existingDLFileEntry.getFileEntryId(), newDLFileEntry.getFileEntryId()); Assert.assertEquals(existingDLFileEntry.getGroupId(), newDLFileEntry.getGroupId()); Assert.assertEquals(existingDLFileEntry.getCompanyId(), newDLFileEntry.getCompanyId()); Assert.assertEquals(existingDLFileEntry.getUserId(), newDLFileEntry.getUserId()); Assert.assertEquals(existingDLFileEntry.getUserName(), newDLFileEntry.getUserName()); Assert.assertEquals( Time.getShortTimestamp(existingDLFileEntry.getCreateDate()), Time.getShortTimestamp(newDLFileEntry.getCreateDate())); Assert.assertEquals( Time.getShortTimestamp(existingDLFileEntry.getModifiedDate()), Time.getShortTimestamp(newDLFileEntry.getModifiedDate())); Assert.assertEquals(existingDLFileEntry.getClassNameId(), newDLFileEntry.getClassNameId()); Assert.assertEquals(existingDLFileEntry.getClassPK(), newDLFileEntry.getClassPK()); Assert.assertEquals(existingDLFileEntry.getRepositoryId(), newDLFileEntry.getRepositoryId()); Assert.assertEquals(existingDLFileEntry.getFolderId(), newDLFileEntry.getFolderId()); Assert.assertEquals(existingDLFileEntry.getTreePath(), newDLFileEntry.getTreePath()); Assert.assertEquals(existingDLFileEntry.getName(), newDLFileEntry.getName()); Assert.assertEquals(existingDLFileEntry.getFileName(), newDLFileEntry.getFileName()); Assert.assertEquals(existingDLFileEntry.getExtension(), newDLFileEntry.getExtension()); Assert.assertEquals(existingDLFileEntry.getMimeType(), newDLFileEntry.getMimeType()); Assert.assertEquals(existingDLFileEntry.getTitle(), newDLFileEntry.getTitle()); Assert.assertEquals(existingDLFileEntry.getDescription(), newDLFileEntry.getDescription()); Assert.assertEquals(existingDLFileEntry.getExtraSettings(), newDLFileEntry.getExtraSettings()); Assert.assertEquals( existingDLFileEntry.getFileEntryTypeId(), newDLFileEntry.getFileEntryTypeId()); Assert.assertEquals(existingDLFileEntry.getVersion(), newDLFileEntry.getVersion()); Assert.assertEquals(existingDLFileEntry.getSize(), newDLFileEntry.getSize()); Assert.assertEquals(existingDLFileEntry.getReadCount(), newDLFileEntry.getReadCount()); Assert.assertEquals(existingDLFileEntry.getSmallImageId(), newDLFileEntry.getSmallImageId()); Assert.assertEquals(existingDLFileEntry.getLargeImageId(), newDLFileEntry.getLargeImageId()); Assert.assertEquals( existingDLFileEntry.getCustom1ImageId(), newDLFileEntry.getCustom1ImageId()); Assert.assertEquals( existingDLFileEntry.getCustom2ImageId(), newDLFileEntry.getCustom2ImageId()); Assert.assertEquals( existingDLFileEntry.getManualCheckInRequired(), newDLFileEntry.getManualCheckInRequired()); Assert.assertEquals( Time.getShortTimestamp(existingDLFileEntry.getLastPublishDate()), Time.getShortTimestamp(newDLFileEntry.getLastPublishDate())); }
protected Contact addContact() throws Exception { long pk = RandomTestUtil.nextLong(); Contact contact = _persistence.create(pk); contact.setMvccVersion(RandomTestUtil.nextLong()); contact.setCompanyId(RandomTestUtil.nextLong()); contact.setUserId(RandomTestUtil.nextLong()); contact.setUserName(RandomTestUtil.randomString()); contact.setCreateDate(RandomTestUtil.nextDate()); contact.setModifiedDate(RandomTestUtil.nextDate()); contact.setClassNameId(RandomTestUtil.nextLong()); contact.setClassPK(RandomTestUtil.nextLong()); contact.setAccountId(RandomTestUtil.nextLong()); contact.setParentContactId(RandomTestUtil.nextLong()); contact.setEmailAddress(RandomTestUtil.randomString()); contact.setFirstName(RandomTestUtil.randomString()); contact.setMiddleName(RandomTestUtil.randomString()); contact.setLastName(RandomTestUtil.randomString()); contact.setPrefixId(RandomTestUtil.nextLong()); contact.setSuffixId(RandomTestUtil.nextLong()); contact.setMale(RandomTestUtil.randomBoolean()); contact.setBirthday(RandomTestUtil.nextDate()); contact.setSmsSn(RandomTestUtil.randomString()); contact.setFacebookSn(RandomTestUtil.randomString()); contact.setJabberSn(RandomTestUtil.randomString()); contact.setSkypeSn(RandomTestUtil.randomString()); contact.setTwitterSn(RandomTestUtil.randomString()); contact.setEmployeeStatusId(RandomTestUtil.randomString()); contact.setEmployeeNumber(RandomTestUtil.randomString()); contact.setJobTitle(RandomTestUtil.randomString()); contact.setJobClass(RandomTestUtil.randomString()); contact.setHoursOfOperation(RandomTestUtil.randomString()); _contacts.add(_persistence.update(contact)); return contact; }