Working with unit tests and making a few corrections around ContentTypes.

This commit is contained in:
Morten Christensen
2012-11-30 09:34:09 -01:00
parent 2f83e5ba31
commit 152c8e810d
25 changed files with 362 additions and 157 deletions

View 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; }
}
}

View File

@@ -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;