C# Class Rebel.Tests.Extensions.HiveModelCreationHelper

Show file Open project: RebelCMS/rebelcmsxu5 Class Usage Examples

Public Properties

Property Type Description
BoolDefAlias string
DefAlias1WithType1 string
DefAlias2WithType1 string
TypeAlias1 string
TypeAlias2 string

Public Methods

Method Description
CreateAttribute ( AttributeDefinition def, object value ) : TypedAttribute
CreateAttributeDefinition ( string alias, string name, string description, AttributeType typeDef, AttributeGroup groupDef, bool assignId = false ) : AttributeDefinition
CreateAttributeGroup ( string alias, string name, int ordinal, bool assignId = false ) : AttributeGroup
CreateAttributeType ( string alias, string name, string description, bool assignId = false ) : AttributeType
CreateEntitySchema ( string alias, string name ) : EntitySchema
CreateEntitySchema ( string alias, string name, bool assignId ) : EntitySchema
CreateTypedEntity ( EntitySchema schema, TypedAttribute attribs, bool assignId = false ) : TypedEntity
CreateVersionedTypedEntity ( EntitySchema schema, TypedAttribute attribs ) : Revision
MockEntitySchema ( string testDoctypeAlias, string testDoctypeName ) : EntitySchema
MockTypedEntity ( ) : TypedEntity
MockTypedEntity ( HiveId id ) : TypedEntity
MockTypedEntity ( bool assignIds ) : TypedEntity
MockVersionedTypedEntity ( ) : Revision

Create a typed persistence entity

MockVersionedTypedEntity ( bool assignIds ) : Revision

Create a typed persistence entity

SetupTestContentData ( System.Guid newGuid, System.Guid newGuidRedHerring, ProviderSetup providerSetup ) : Content
SetupTestData ( System.Guid newGuid, System.Guid newGuidRedHerring, ProviderSetup providerSetup ) : TypedEntity

Private Methods

Method Description
CreateMockTypedEntityProperties ( bool assignIds, TypedAttribute[]>.Action callback ) : void

Create some properties for a TypedEntity

Method Details

CreateAttribute() public static method

public static CreateAttribute ( AttributeDefinition def, object value ) : TypedAttribute
def AttributeDefinition
value object
return TypedAttribute

CreateAttributeDefinition() public static method

public static CreateAttributeDefinition ( string alias, string name, string description, AttributeType typeDef, AttributeGroup groupDef, bool assignId = false ) : AttributeDefinition
alias string
name string
description string
typeDef AttributeType
groupDef Rebel.Framework.Persistence.Model.Attribution.AttributeGroup
assignId bool
return AttributeDefinition

CreateAttributeGroup() public static method

public static CreateAttributeGroup ( string alias, string name, int ordinal, bool assignId = false ) : AttributeGroup
alias string
name string
ordinal int
assignId bool
return Rebel.Framework.Persistence.Model.Attribution.AttributeGroup

CreateAttributeType() public static method

public static CreateAttributeType ( string alias, string name, string description, bool assignId = false ) : AttributeType
alias string
name string
description string
assignId bool
return AttributeType

CreateEntitySchema() public static method

public static CreateEntitySchema ( string alias, string name ) : EntitySchema
alias string
name string
return EntitySchema

CreateEntitySchema() public static method

public static CreateEntitySchema ( string alias, string name, bool assignId ) : EntitySchema
alias string
name string
assignId bool
return EntitySchema

CreateTypedEntity() public static method

public static CreateTypedEntity ( EntitySchema schema, TypedAttribute attribs, bool assignId = false ) : TypedEntity
schema EntitySchema
attribs TypedAttribute
assignId bool
return TypedEntity

CreateVersionedTypedEntity() public static method

public static CreateVersionedTypedEntity ( EntitySchema schema, TypedAttribute attribs ) : Revision
schema EntitySchema
attribs TypedAttribute
return Revision

MockEntitySchema() public static method

public static MockEntitySchema ( string testDoctypeAlias, string testDoctypeName ) : EntitySchema
testDoctypeAlias string
testDoctypeName string
return EntitySchema

MockTypedEntity() public static method

public static MockTypedEntity ( ) : TypedEntity
return TypedEntity

MockTypedEntity() public static method

public static MockTypedEntity ( HiveId id ) : TypedEntity
id HiveId
return TypedEntity

MockTypedEntity() public static method

public static MockTypedEntity ( bool assignIds ) : TypedEntity
assignIds bool
return TypedEntity

MockVersionedTypedEntity() public static method

Create a typed persistence entity
public static MockVersionedTypedEntity ( ) : Revision
return Revision

MockVersionedTypedEntity() public static method

Create a typed persistence entity
public static MockVersionedTypedEntity ( bool assignIds ) : Revision
assignIds bool whether or not to generate Ids for each entity
return Revision

SetupTestContentData() public static method

public static SetupTestContentData ( System.Guid newGuid, System.Guid newGuidRedHerring, ProviderSetup providerSetup ) : Content
newGuid System.Guid
newGuidRedHerring System.Guid
providerSetup Rebel.Hive.ProviderSetup
return Content

SetupTestData() public static method

public static SetupTestData ( System.Guid newGuid, System.Guid newGuidRedHerring, ProviderSetup providerSetup ) : TypedEntity
newGuid System.Guid
newGuidRedHerring System.Guid
providerSetup Rebel.Hive.ProviderSetup
return TypedEntity

Property Details

BoolDefAlias public static property

public static string BoolDefAlias
return string

DefAlias1WithType1 public static property

public static string DefAlias1WithType1
return string

DefAlias2WithType1 public static property

public static string DefAlias2WithType1
return string

TypeAlias1 public static property

public static string TypeAlias1
return string

TypeAlias2 public static property

public static string TypeAlias2
return string