Class CreateStrategy<T>
Represents base strategy of entity creation.
Inheritance
System.Object
CreateStrategy<T>
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Relativity.Testing.Framework.Strategies
Assembly: Relativity.Testing.Framework.dll
Syntax
public abstract class CreateStrategy<T> : ICreateStrategy<T> where T : Artifact
Type Parameters
Name | Description |
---|---|
T | The type of the entity. |
Methods
| Improve this Doc View SourceCreate(T)
Creates the specified entity.
Before the creation ensures that entity
is not null
and fills required properties of entity if it implements IFillsRequiredProperties<T>.
After the creation adds created entity to the current session.
Declaration
public T Create(T entity)
Parameters
Type | Name | Description |
---|---|---|
T | entity | The entity to create. |
Returns
Type | Description |
---|---|
T | The created entity. |
DoCreate(T)
Does create the specified entity.
Declaration
protected abstract T DoCreate(T entity)
Parameters
Type | Name | Description |
---|---|---|
T | entity | The entity to create. |
Returns
Type | Description |
---|---|
T | The created entity. |
FillRequiredProperties(T)
Fills the required properties of the entity.
Declaration
protected static void FillRequiredProperties(T entity)
Parameters
Type | Name | Description |
---|---|---|
T | entity | The entity to be filled. |
ValidateEntity(T)
Validates the entity.
Declaration
protected static void ValidateEntity(T entity)
Parameters
Type | Name | Description |
---|---|---|
T | entity | The entity to be validated. |