private void StartImportIntoEpiServerCommerceTest(string fileNameInCloud, Dictionary <string, string> settings) { using (ShimsContext.Create()) { //Arrange ShiminRiverContext.AllInstances.SettingsGet = settingsGet => settings; ShiminRiverContext.AllInstances.ExtensionManagerGet = extensionManager => new StubIinRiverManager() { ModelServiceGet = () => { return(new StubIModelService() { GetAllLinkTypes = () => new List <Remoting.Objects.LinkType>(), }); } }; ShiminRiverContext.AllInstances.LogLogLevelString = (cx, logLevel, message) => { Trace.WriteLine($"{logLevel.ToString().ToUpper().PadRight(12, ' ')} {message}"); }; ShiminRiverContext context = new ShiminRiverContext(); //Act EpiApi api = new EpiApi(context); Configuration configuration = new Configuration(context); api.StartImportIntoEpiServerCommerce(fileNameInCloud, Guid.NewGuid(), configuration); //Assert } }
private void ImportResourcesTest(string fileNameInCloud, Dictionary <string, string> settings) { Trace.WriteLine($"Processing {fileNameInCloud}."); string baseResourcePath = "resource"; using (ShimsContext.Create()) { ShiminRiverContext.AllInstances.SettingsGet = settingsGet => settings; ShiminRiverContext.AllInstances.LogLogLevelString = (cx, logLevel, message) => { Trace.WriteLine($"{logLevel.ToString().ToUpper().PadRight(12, ' ')} {message}"); }; ShiminRiverContext context = new ShiminRiverContext(); //Act Importer importer = new Importer(context); importer.ImportResources(fileNameInCloud, baseResourcePath, string.Empty); //Assert } }