org.kuali.rice.ken.test.util
Class MockObjectsUtil

java.lang.Object
  extended by org.kuali.rice.ken.test.util.MockObjectsUtil

public final class MockObjectsUtil
extends Object

This class helps to provide common mock objects for testing and also helper methods to build instances of objects.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Constructor Summary
private MockObjectsUtil()
           
 
Method Summary
static Notification buildTestNotification(String deliveryType, Timestamp sendDateTime, Timestamp autoRemoveDateTime, NotificationContentType contentType, String content, NotificationPriority priority, NotificationProducer producer, NotificationChannel channel, List<NotificationRecipient> recipients, List<NotificationSender> senders)
          This method is a helper to build a Notification instance.
static NotificationChannel buildTestNotificationChannel(String name, String description, boolean subscribable)
          This method is a helper to build a NotificationChannel instance.
static NotificationChannelReviewer buildTestNotificationChannelReviewer(String reviewerType, String reviewerId)
          This method is a helper to build a NotificationChannelReviewer instance.
static NotificationContentType buildTestNotificationContentType(String name, String description, String namespace, String xsd, String xsl)
          This method is a helper to build a NotificationContentType instance.
static NotificationPriority buildTestNotificationPriority(String name, String description, Integer order)
          This method is a helper to build a NotificationPriority instance.
static NotificationProducer buildTestNotificationProducer(String name, String description, String contactInfo)
          This method is a helper to build a NotificationProducer instance.
static NotificationRecipient buildTestNotificationRecipient(String recipientId, String recipientType)
          This method is a helper to build a NotificationRecipient instance.
static NotificationSender buildTestNotificationSender(String userId)
          This method is a helper to build a NotificationSender instance.
static NotificationChannel getTestChannel1()
          This method returns back a specific test mock object.
static NotificationChannel getTestChannel2()
          This method returns back a specific test mock object.
static NotificationContentType getTestContentType1()
          This method returns back a specific test mock object.
static NotificationPriority getTestPriority1()
          This method returns back a specific test mock object.
static NotificationProducer getTestProducer1()
          This method returns back a specific test mock object.
static NotificationRecipient getTestRecipient1()
          This method returns back a specific test mock object.
static NotificationRecipient getTestRecipient2()
          This method returns back a specific test mock object.
static NotificationSender getTestSender1()
          This method returns back a specific test mock object.
static NotificationSender getTestSender2()
          This method returns back a specific test mock object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MockObjectsUtil

private MockObjectsUtil()
Method Detail

buildTestNotificationChannel

public static final NotificationChannel buildTestNotificationChannel(String name,
                                                                     String description,
                                                                     boolean subscribable)
This method is a helper to build a NotificationChannel instance.

Parameters:
name -
description -
subscribable -
Returns:
NotificationChannel

getTestChannel1

public static final NotificationChannel getTestChannel1()
This method returns back a specific test mock object.

Returns:
NotificationChannel

getTestChannel2

public static final NotificationChannel getTestChannel2()
This method returns back a specific test mock object.

Returns:
NotificationChannel

buildTestNotificationProducer

public static final NotificationProducer buildTestNotificationProducer(String name,
                                                                       String description,
                                                                       String contactInfo)
This method is a helper to build a NotificationProducer instance.

Parameters:
name -
description -
contactInfo -
Returns:

buildTestNotificationChannelReviewer

public static final NotificationChannelReviewer buildTestNotificationChannelReviewer(String reviewerType,
                                                                                     String reviewerId)
This method is a helper to build a NotificationChannelReviewer instance.

Parameters:
reviewerType -
reviewerId -
Returns:

getTestProducer1

public static final NotificationProducer getTestProducer1()
This method returns back a specific test mock object.

Returns:
NotificationProducer

buildTestNotificationContentType

public static final NotificationContentType buildTestNotificationContentType(String name,
                                                                             String description,
                                                                             String namespace,
                                                                             String xsd,
                                                                             String xsl)
This method is a helper to build a NotificationContentType instance.

Parameters:
name -
description -
namespace -
xsd -
Returns:
NotificationContentType

getTestContentType1

public static final NotificationContentType getTestContentType1()
This method returns back a specific test mock object.

Returns:
NotificationContentType

buildTestNotificationPriority

public static final NotificationPriority buildTestNotificationPriority(String name,
                                                                       String description,
                                                                       Integer order)
This method is a helper to build a NotificationPriority instance.

Parameters:
name -
description -
order -
Returns:
NotificationPriority

getTestPriority1

public static final NotificationPriority getTestPriority1()
This method returns back a specific test mock object.

Returns:
NotificationPriority

buildTestNotificationRecipient

public static final NotificationRecipient buildTestNotificationRecipient(String recipientId,
                                                                         String recipientType)
This method is a helper to build a NotificationRecipient instance.

Parameters:
recipientId -
recipientType -
Returns:
NotificationRecipient

getTestRecipient1

public static final NotificationRecipient getTestRecipient1()
This method returns back a specific test mock object.

Returns:
NotificationRecipient

getTestRecipient2

public static final NotificationRecipient getTestRecipient2()
This method returns back a specific test mock object.

Returns:
NotificationRecipient

buildTestNotification

public static final Notification buildTestNotification(String deliveryType,
                                                       Timestamp sendDateTime,
                                                       Timestamp autoRemoveDateTime,
                                                       NotificationContentType contentType,
                                                       String content,
                                                       NotificationPriority priority,
                                                       NotificationProducer producer,
                                                       NotificationChannel channel,
                                                       List<NotificationRecipient> recipients,
                                                       List<NotificationSender> senders)
This method is a helper to build a Notification instance.

Parameters:
recipientId -
recipientType -
Returns:
Notification

buildTestNotificationSender

public static final NotificationSender buildTestNotificationSender(String userId)
This method is a helper to build a NotificationSender instance.

Parameters:
recipientId -
recipientType -
Returns:
NotificationSender

getTestSender1

public static final NotificationSender getTestSender1()
This method returns back a specific test mock object.

Returns:
NotificationSender

getTestSender2

public static final NotificationSender getTestSender2()
This method returns back a specific test mock object.

Returns:
NotificationSender


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.