RegisterUnique

This commit is contained in:
Stephan
2018-11-29 10:35:16 +01:00
parent e9de6c1fc9
commit c6891c6c70
63 changed files with 520 additions and 602 deletions

View File

@@ -81,14 +81,14 @@ namespace Umbraco.Tests.Web.Controllers
var textService = new Mock<ILocalizedTextService>();
textService.Setup(x => x.Localize(It.IsAny<string>(), It.IsAny<CultureInfo>(), It.IsAny<IDictionary<string, string>>())).Returns("");
Composition.RegisterSingleton(f => Mock.Of<IContentService>());
Composition.RegisterSingleton(f => userServiceMock.Object);
Composition.RegisterSingleton(f => entityService.Object);
Composition.RegisterSingleton(f => dataTypeService.Object);
Composition.RegisterSingleton(f => langService.Object);
Composition.RegisterSingleton(f => textService.Object);
Composition.RegisterSingleton(f => Mock.Of<ICultureDictionaryFactory>());
Composition.RegisterSingleton(f => new UmbracoApiControllerTypeCollection(new[] { typeof(ContentTreeController) }));
Composition.RegisterUnique(f => Mock.Of<IContentService>());
Composition.RegisterUnique(f => userServiceMock.Object);
Composition.RegisterUnique(f => entityService.Object);
Composition.RegisterUnique(f => dataTypeService.Object);
Composition.RegisterUnique(f => langService.Object);
Composition.RegisterUnique(f => textService.Object);
Composition.RegisterUnique(f => Mock.Of<ICultureDictionaryFactory>());
Composition.RegisterUnique(f => new UmbracoApiControllerTypeCollection(new[] { typeof(ContentTreeController) }));
}
private MultipartFormDataContent GetMultiPartRequestContent(string json)