private IContainer CreateDependencyContainer()
        {
            var folder    = Path.Combine(ScaffoldUtility.GetRootFolder(), "Infrastructure", "Data", "Json");
            var container = DependencyService.CreateContainer(null, folder, null);

            return(container);
        }
Esempio n. 2
0
        public void Resolve_CanResolveCacheService()
        {
            var settingsMock = new Mock <ISetting>();

            settingsMock.Setup(x => x.Facet).Returns(new FacetSetting());
            settingsMock.Setup(x => x.Store).Returns(new StoreSetting());
            using (var container = DependencyService.CreateContainer(null, ScaffoldUtility.JsonDataFolder(), settingsMock.Object))
                using (var scope = container.BeginLifetimeScope()) {
                    Assert.NotNull(scope.Resolve <ISeadQueryCache>());
                }
        }
 public static string JsonDataFolder()
 {
     return(Path.Combine(ScaffoldUtility.GetRootFolder(), "Infrastructure", "Data", "Json"));
 }
 public SeadJsonFacetContextFixture() : base(Path.Combine(ScaffoldUtility.GetRootFolder(), "Infrastructure", "Data", "Json"))
 {
 }
Esempio n. 5
0
 public JsonFacetContextFixture(string folder)
 {
     Folder    = folder; // ScaffoldUtility.JsonDataFolder();
     Types     = ScaffoldUtility.GetModelTypes();
     LazyItems = new Lazy <ItemsDictionary>(Load);
 }