Fixes tests

This commit is contained in:
Shannon
2017-02-02 22:21:36 +11:00
parent ff6ea0b42e
commit a03e0dfb53
2 changed files with 8 additions and 1 deletions

View File

@@ -58,6 +58,9 @@ namespace Umbraco.Core
if (fi.IsLiteral && fi.IsInitOnly == false)
{
var udiType = fi.GetCustomAttribute<Constants.UdiTypeAttribute>();
if (udiType == null)
throw new InvalidOperationException("All Constants listed in UdiEntityType must be attributed with " + typeof(Constants.UdiTypeAttribute));
result[fi.GetValue(null).ToString()] = udiType.UdiType;
}
}

View File

@@ -55,10 +55,14 @@ namespace Umbraco.Core
[UdiType(UdiType.GuidUdi)]
public const string RelationType = "relation-type";
// forms
[UdiType(UdiType.GuidUdi)]
public const string FormsForm = "forms-form";
[UdiType(UdiType.GuidUdi)]
public const string FormsWorkflow = "forms-workflow";
[UdiType(UdiType.GuidUdi)]
public const string FormsRecord = "forms-record";
// string entity types