Skip to content

Commit f8095be

Browse files
Fix CanConvertImageCropperPropertyEditor test by providing correct configuration
1 parent fdb6171 commit f8095be

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/Umbraco.Tests/PropertyEditors/ImageCropperTest.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,20 @@ public void CanConvertImageCropperPropertyEditor(string val1, string val2, bool
8282

8383
var mediaFileSystem = new MediaFileSystem(Mock.Of<IFileSystem>(), config, scheme, logger);
8484

85+
var imageCropperConfiguration = new ImageCropperConfiguration()
86+
{
87+
Crops = new[]
88+
{
89+
new ImageCropperConfiguration.Crop()
90+
{
91+
Alias = "thumb",
92+
Width = 100,
93+
Height = 100
94+
}
95+
}
96+
};
8597
var dataTypeService = new TestObjects.TestDataTypeService(
86-
new DataType(new ImageCropperPropertyEditor(Mock.Of<ILogger>(), mediaFileSystem, Mock.Of<IContentSection>(), Mock.Of<IDataTypeService>())) { Id = 1 });
98+
new DataType(new ImageCropperPropertyEditor(Mock.Of<ILogger>(), mediaFileSystem, Mock.Of<IContentSection>(), Mock.Of<IDataTypeService>())) { Id = 1, Configuration = imageCropperConfiguration });
8799

88100
var factory = new PublishedContentTypeFactory(Mock.Of<IPublishedModelFactory>(), new PropertyValueConverterCollection(Array.Empty<IPropertyValueConverter>()), dataTypeService);
89101

0 commit comments

Comments
 (0)