com.stratelia.webactiv.almanach.model
Class EventDetailBuilder

java.lang.Object
  extended by com.stratelia.webactiv.almanach.model.EventDetailBuilder

public class EventDetailBuilder
extends Object

A builder of event details used in tests. The events built by this builder are thoses expected in the database. So the events built by this builder have to reflect any change performed in the test database.


Field Summary
static String[] NON_PERIODIC_EVENTS
           
static String[] PERIODIC_EVENTS
           
 
Constructor Summary
EventDetailBuilder()
           
 
Method Summary
static EventDetailBuilder anEventDetailOfId(String id)
          Gets a builder for the event detail identified by the specified unique identifier.
 EventDetail build()
          Builds an instance of the asked event detail.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PERIODIC_EVENTS

public static final String[] PERIODIC_EVENTS

NON_PERIODIC_EVENTS

public static final String[] NON_PERIODIC_EVENTS
Constructor Detail

EventDetailBuilder

public EventDetailBuilder()
Method Detail

anEventDetailOfId

public static EventDetailBuilder anEventDetailOfId(String id)
                                            throws Exception
Gets a builder for the event detail identified by the specified unique identifier.

Parameters:
id - the unique identifier of the event to build.
Returns:
the event detail builder ready to build the asked event.
Throws:
Exception - if an error occurs while preparing the builder.

build

public EventDetail build()
Builds an instance of the asked event detail.

Returns:
an EventDetail instance ready to be used in tests.


Copyright © 2016 Silverpeas. All Rights Reserved.