From a03e0dfb53262c15888fe3f06cdccb3b7d53c7cc Mon Sep 17 00:00:00 2001 From: Shannon Date: Thu, 2 Feb 2017 22:21:36 +1100 Subject: [PATCH] Fixes tests --- src/Umbraco.Core/Udi.cs | 3 +++ src/Umbraco.Core/UdiEntityType.cs | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Core/Udi.cs b/src/Umbraco.Core/Udi.cs index 3161b4100e..9d67c6ccab 100644 --- a/src/Umbraco.Core/Udi.cs +++ b/src/Umbraco.Core/Udi.cs @@ -58,6 +58,9 @@ namespace Umbraco.Core if (fi.IsLiteral && fi.IsInitOnly == false) { var udiType = fi.GetCustomAttribute(); + + 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; } } diff --git a/src/Umbraco.Core/UdiEntityType.cs b/src/Umbraco.Core/UdiEntityType.cs index 3ab32a6eac..bc7b0571d7 100644 --- a/src/Umbraco.Core/UdiEntityType.cs +++ b/src/Umbraco.Core/UdiEntityType.cs @@ -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