From 09b18c022794372b64bb2de19dcb3ae22961a78a Mon Sep 17 00:00:00 2001 From: Andy Butland Date: Sun, 5 Apr 2020 09:31:56 +0200 Subject: [PATCH] Removed some properties unnecessarily set in tests as they will be set by default by the builder. --- .../Umbraco.Infrastructure/Models/PropertyGroupTests.cs | 9 --------- .../Umbraco.Infrastructure/Models/PropertyTests.cs | 3 --- .../Umbraco.Infrastructure/Models/PropertyTypeTests.cs | 3 --- 3 files changed, 15 deletions(-) diff --git a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Models/PropertyGroupTests.cs b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Models/PropertyGroupTests.cs index 7e9faef02f..bb7c2ec6d8 100644 --- a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Models/PropertyGroupTests.cs +++ b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Models/PropertyGroupTests.cs @@ -58,11 +58,8 @@ namespace Umbraco.Tests.UnitTests.Umbraco.Infrastructure.Models { return _builder .WithId(77) - .WithCreateDate(DateTime.Now) .WithName("Group1") .WithSortOrder(555) - .WithKey(Guid.NewGuid()) - .WithUpdateDate(DateTime.Now) .AddPropertyType() .WithId(3) .WithPropertyEditorAlias("TestPropertyEditor") @@ -71,10 +68,7 @@ namespace Umbraco.Tests.UnitTests.Umbraco.Infrastructure.Models .WithName("Test") .WithSortOrder(9) .WithDataTypeId(5) - .WithCreateDate(DateTime.Now) - .WithUpdateDate(DateTime.Now) .WithDescription("testing") - .WithKey(Guid.NewGuid()) .WithPropertyGroupId(11) .WithMandatory(true) .WithValidationRegExp("xxxx") @@ -87,10 +81,7 @@ namespace Umbraco.Tests.UnitTests.Umbraco.Infrastructure.Models .WithName("Test2") .WithSortOrder(10) .WithDataTypeId(6) - .WithCreateDate(DateTime.Now) - .WithUpdateDate(DateTime.Now) .WithDescription("testing2") - .WithKey(Guid.NewGuid()) .WithPropertyGroupId(12) .WithMandatory(true) .WithValidationRegExp("yyyy") diff --git a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Models/PropertyTests.cs b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Models/PropertyTests.cs index 855a7e3d95..45ed2bd0aa 100644 --- a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Models/PropertyTests.cs +++ b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Models/PropertyTests.cs @@ -53,10 +53,7 @@ namespace Umbraco.Tests.UnitTests.Umbraco.Infrastructure.Models .WithName("Test") .WithSortOrder(9) .WithDataTypeId(5) - .WithCreateDate(DateTime.Now) - .WithUpdateDate(DateTime.Now) .WithDescription("testing") - .WithKey(Guid.NewGuid()) .WithPropertyGroupId(11) .WithMandatory(true) .WithValidationRegExp("xxxx") diff --git a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Models/PropertyTypeTests.cs b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Models/PropertyTypeTests.cs index a0808314c4..ce90f1d3b7 100644 --- a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Models/PropertyTypeTests.cs +++ b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Models/PropertyTypeTests.cs @@ -74,10 +74,7 @@ namespace Umbraco.Tests.UnitTests.Umbraco.Infrastructure.Models .WithName("Test") .WithSortOrder(9) .WithDataTypeId(5) - .WithCreateDate(DateTime.Now) - .WithUpdateDate(DateTime.Now) .WithDescription("testing") - .WithKey(Guid.NewGuid()) .WithPropertyGroupId(11) .WithMandatory(true) .WithValidationRegExp("xxxx")