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

            return(container);
        }
Ejemplo 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>());
                }
        }
Ejemplo n.º 3
0
 public static string JsonDataFolder()
 {
     return(Path.Combine(ScaffoldUtility.GetRootFolder(), "Infrastructure", "Data", "Json"));
 }
 public SeadJsonFacetContextFixture() : base(Path.Combine(ScaffoldUtility.GetRootFolder(), "Infrastructure", "Data", "Json"))
 {
 }
Ejemplo n.º 5
0
 public JsonFacetContextFixture(string folder)
 {
     Folder    = folder; // ScaffoldUtility.JsonDataFolder();
     Types     = ScaffoldUtility.GetModelTypes();
     LazyItems = new Lazy <ItemsDictionary>(Load);
 }