Fix, now boots and runs
This commit is contained in:
@@ -113,10 +113,11 @@ namespace Umbraco.Tests.Facade
|
||||
.Returns((PublishedPropertyType propertyType, IPublishedElement element, bool preview, PropertyCacheLevel referenceCacheLevel, object source)
|
||||
=> new TestPublishedProperty(propertyType, element, preview, referenceCacheLevel, source));
|
||||
|
||||
var lazyFacadeService = new Lazy<IFacadeService>(() => facadeService.Object);
|
||||
var converters = new PropertyValueConverterCollection(new IPropertyValueConverter[]
|
||||
{
|
||||
new NestedContentSingleValueConverter(facadeAccessor.Object, facadeService.Object, publishedModelFactory.Object, proflog),
|
||||
new NestedContentManyValueConverter(facadeAccessor.Object, facadeService.Object, publishedModelFactory.Object, proflog),
|
||||
new NestedContentSingleValueConverter(facadeAccessor.Object, lazyFacadeService, publishedModelFactory.Object, proflog),
|
||||
new NestedContentManyValueConverter(facadeAccessor.Object, lazyFacadeService, publishedModelFactory.Object, proflog),
|
||||
});
|
||||
|
||||
var propertyType1 = new PublishedPropertyType("property1", 1, Constants.PropertyEditors.NestedContentAlias, converters);
|
||||
|
||||
@@ -272,9 +272,11 @@ namespace Umbraco.Tests.Services
|
||||
ServiceContext.ContentTypeService.Save(contentType1);
|
||||
ServiceContext.ContentTypeService.Save(contentType2);
|
||||
var contentItems1 = MockedContent.CreateTextpageContent(contentType1, -1, 10).ToArray();
|
||||
contentItems1.ForEach(x => ServiceContext.ContentService.SaveAndPublishWithStatus(x));
|
||||
foreach (var x in contentItems1)
|
||||
ServiceContext.ContentService.SaveAndPublishWithStatus(x);
|
||||
var contentItems2 = MockedContent.CreateTextpageContent(contentType2, -1, 5).ToArray();
|
||||
contentItems2.ForEach(x => ServiceContext.ContentService.SaveAndPublishWithStatus(x));
|
||||
foreach (var x in contentItems2)
|
||||
ServiceContext.ContentService.SaveAndPublishWithStatus(x);
|
||||
//only update the contentType1 alias which will force an xml rebuild for all content of that type
|
||||
contentType1.Alias = "newAlias";
|
||||
ServiceContext.ContentTypeService.Save(contentType1);
|
||||
@@ -305,7 +307,8 @@ namespace Umbraco.Tests.Services
|
||||
var contentType1 = MockedContentTypes.CreateTextpageContentType("test1", "Test1");
|
||||
ServiceContext.ContentTypeService.Save(contentType1);
|
||||
var contentItems1 = MockedContent.CreateTextpageContent(contentType1, -1, 10).ToArray();
|
||||
contentItems1.ForEach(x => ServiceContext.ContentService.SaveAndPublishWithStatus(x));
|
||||
foreach (var x in contentItems1)
|
||||
ServiceContext.ContentService.SaveAndPublishWithStatus(x);
|
||||
var alias = contentType1.PropertyTypes.First().Alias;
|
||||
var elementToMatch = "<" + alias + ">";
|
||||
|
||||
|
||||
@@ -311,7 +311,8 @@ namespace Umbraco.Tests.TestHelpers.Entities
|
||||
{
|
||||
var contentType = CreateSimpleContentType(alias, name, groupedCollection);
|
||||
//now add the non-grouped properties
|
||||
nonGroupedCollection.ForEach(pt => contentType.AddPropertyType(pt));
|
||||
foreach (var x in nonGroupedCollection)
|
||||
contentType.AddPropertyType(x);
|
||||
|
||||
//ensure that nothing is marked as dirty
|
||||
contentType.ResetDirtyProperties(false);
|
||||
|
||||
Reference in New Issue
Block a user