Working with unit tests and making a few corrections around ContentTypes.
This commit is contained in:
18
src/Umbraco.Tests/CodeFirst/Attributes/MixinAttribute.cs
Normal file
18
src/Umbraco.Tests/CodeFirst/Attributes/MixinAttribute.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
namespace Umbraco.Tests.CodeFirst.Attributes
|
||||
{
|
||||
[AttributeUsage(AttributeTargets.Interface, AllowMultiple = false, Inherited = true)]
|
||||
public class MixinAttribute : Attribute
|
||||
{
|
||||
public MixinAttribute(Type type)
|
||||
{
|
||||
Type = type;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Type of the implementing class
|
||||
/// </summary>
|
||||
public Type Type { get; private set; }
|
||||
}
|
||||
}
|
||||
@@ -30,8 +30,8 @@ namespace Umbraco.Tests.CodeFirst.Attributes
|
||||
|
||||
if(string.IsNullOrEmpty(PreValue) == false)
|
||||
{
|
||||
Conventions.CreatePrevalueForDataTypeDefinition(definition.DataTypeDefinition.Id, PreValue, 0,
|
||||
string.Empty);
|
||||
//TODO - test inserting a prevalue when a DataTypeDefinition has been created, as its currently throwing a foreignkey constraint error.
|
||||
Conventions.CreatePrevalueForDataTypeDefinition(definition.DataTypeDefinition.Id, PreValue, 0, string.Empty);
|
||||
}
|
||||
|
||||
return definition;
|
||||
|
||||
Reference in New Issue
Block a user