Amended PropertyBuilder to return IProperty and removed some unnecessary default properties from built test class.

This commit is contained in:
Andy Butland
2020-04-10 17:01:47 +02:00
parent 09b18c0227
commit 650126cfc8
2 changed files with 3 additions and 6 deletions
@@ -5,7 +5,7 @@ using Umbraco.Tests.Common.Builders.Interfaces;
namespace Umbraco.Tests.Common.Builders
{
public class PropertyBuilder
: BuilderBase<Property>,
: BuilderBase<IProperty>,
IBuildPropertyTypes,
IWithIdBuilder,
IWithKeyBuilder,
@@ -26,7 +26,7 @@ namespace Umbraco.Tests.Common.Builders
return builder;
}
public override Property Build()
public override IProperty Build()
{
var id = _id ?? 1;
var key = _key ?? Guid.NewGuid();
@@ -38,13 +38,10 @@ namespace Umbraco.Tests.UnitTests.Umbraco.Infrastructure.Models
}
}
private Property BuildProperty()
private IProperty BuildProperty()
{
return _builder
.WithId(4)
.WithKey(Guid.NewGuid())
.WithCreateDate(DateTime.Now)
.WithUpdateDate(DateTime.Now)
.AddPropertyType()
.WithId(3)
.WithPropertyEditorAlias("TestPropertyEditor")