Exemplo n.º 1
0
        public void LoadConfigByJson()
        {
            using (var installationContext = new ConfigurationContext())
            {
                installationContext.Database.OpenConnection();
                var builder = new JsonObjectLoader();
                IEnumerable <GameConfiguration> result;
                Stopwatch stopwatch = new Stopwatch();
                stopwatch.Start();
                try
                {
                    result = builder.LoadAllObjects <EntityFramework.GameConfiguration>(installationContext).ToList();
                }
                finally
                {
                    stopwatch.Stop();
                }

                Assert.That(result, Is.Not.Null);
                Assert.That(result.Count, Is.Not.EqualTo(0));
                Assert.That(stopwatch.ElapsedMilliseconds, Is.EqualTo(0));
            }
        }