Example #1
0
        public static GuidsDBContext GetDBContext(string dbName)
        {
            var options = new DbContextOptionsBuilder <GuidsDBContext>()
                          .UseInMemoryDatabase(databaseName: dbName)
                          .Options;

            var dbContext = new GuidsDBContext(options);

            return(dbContext);
        }
Example #2
0
 public GuidController(GuidsDBContext context, ICaching cache)
 {
     _context = context;
     _cache   = cache;
     _manager = new GuidManager(_context, _cache);
 }
Example #3
0
 public GuidManager(GuidsDBContext context, ICaching cache)
 {
     _context = context;
     _cache   = cache;
 }
Example #4
0
 public UnitTests()
 {
     _caching        = new CacheMock();
     _dbContext      = DbContextMock.GetDBContext("Cylance");
     _guidController = new GuidController(_dbContext, _caching);
 }