示例#1
0
 private static EtymologyController CreateController() =>
 new EtymologyController(
     EtymologyContextTests.CreateDatabase(),
     new NullLogger <EtymologyController>(),
     new MemoryCache(new OptionsWrapper <MemoryCacheOptions>(new MemoryCacheOptions())))
 {
     ControllerContext = new ControllerContext()
     {
         HttpContext = new DefaultHttpContext()
     }
 };
示例#2
0
        private static EtymologyController CreateController()
        {
            CharacterCache characterCache = new CharacterCache();

            characterCache.Initialize(EtymologyContextTests.CreateDatabase()).Wait();
            return(new EtymologyController(
                       EtymologyContextTests.CreateDatabase(),
                       new NullLogger <EtymologyController>(),
                       new MemoryCache(new OptionsWrapper <MemoryCacheOptions>(new MemoryCacheOptions())),
                       characterCache)
            {
                ControllerContext = new ControllerContext()
                {
                    HttpContext = new DefaultHttpContext()
                }
            });
        }