Unit tests covering the ContentService.

Adding new configurations to the release configs.
Refactoring the publishing strategy and a few of the services.
This commit is contained in:
sitereactor
2012-11-01 10:59:32 -01:00
parent 053e26b34c
commit b1240abf0b
12 changed files with 354 additions and 101 deletions

View File

@@ -98,8 +98,8 @@ namespace Umbraco.Core.Models
if (!typeValidation)
throw new Exception(
string.Format(
"Type validation failed. The value type: {0} does not match the DataType in PropertyType with alias: {1}",
value.GetType(), Alias));
"Type validation failed. The value type: '{0}' does not match the DataType in PropertyType with alias: '{1}'",
value == null ? "null" : value.GetType().Name, Alias));
_value = value;
OnPropertyChanged(ValueSelector);

View File

@@ -256,6 +256,9 @@ namespace Umbraco.Core.Models
/// <returns>True if valid, otherwise false</returns>
public bool IsPropertyTypeValid(object value)
{
if (value == null)
return false;
//Check type if the type of the value match the type from the DataType/PropertyEditor
Type type = value.GetType();