Refactor editing, all tests green
This commit is contained in:
@@ -31,7 +31,7 @@ namespace Umbraco.Tests.Models.Mapping
|
||||
Container.Register(_ => manifestBuilder);
|
||||
|
||||
Func<IEnumerable<Type>> typeListProducerList = Enumerable.Empty<Type>;
|
||||
Container.GetInstance<PropertyEditorCollectionBuilder>()
|
||||
Container.GetInstance<DataEditorCollectionBuilder>()
|
||||
.Clear()
|
||||
.Add(typeListProducerList);
|
||||
}
|
||||
|
||||
@@ -72,7 +72,8 @@ namespace Umbraco.Tests.Models.Mapping
|
||||
|
||||
// create and register a fake property editor collection to return fake property editors
|
||||
var editors = new ConfiguredDataEditor[] { new TextboxPropertyEditor(Mock.Of<ILogger>()), };
|
||||
_editorsMock = new Mock<PropertyEditorCollection>(new object[] { editors });
|
||||
var dataEditors = new DataEditorCollection(editors);
|
||||
_editorsMock = new Mock<PropertyEditorCollection>(dataEditors);
|
||||
_editorsMock.Setup(x => x[It.IsAny<string>()]).Returns(editors[0]);
|
||||
Container.RegisterSingleton(f => _editorsMock.Object);
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ namespace Umbraco.Tests.Models.Mapping
|
||||
Container.RegisterSingleton(f => Mock.Of<ICultureDictionaryFactory>());
|
||||
}
|
||||
|
||||
[ValueEditor("Test.Test", "Test", "~/Test.html")]
|
||||
[DataEditor("Test.Test", "Test", "~/Test.html")]
|
||||
public class TestPropertyEditor : ConfiguredDataEditor
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user