コード例 #1
0
        //TODO: Fix this test
        //[Fact]
        public void when_generating_database_from_existing_files_then_succeeds()
        {
            var stopwatch = new Stopwatch();

            stopwatch.Start();

            var context = AnmatContext.Initialize();

            Thread.CurrentThread.CurrentCulture = new CultureInfo(context.Configuration.DefaultCulture);

            var latestVersion = context.VersionService.GetLatestVersion();

            context.JobService.CreateJob(latestVersion.Number + 1);

            var databaseFileName = context.SQLGenerator.GenerateDatabase(context.DocumentGenerators);

            stopwatch.Stop();

            var script = context.SQLGenerator.Script;

            Debug.WriteLine(string.Format("ANMAT Data Generation duration: {0} secs", stopwatch.ElapsedMilliseconds / 1000));

            Assert.False(string.IsNullOrEmpty(script));
            Assert.False(string.IsNullOrEmpty(databaseFileName));
            Assert.True(File.Exists(databaseFileName));
        }
コード例 #2
0
 public DataUploadController()
 {
     this.context = AnmatContext.Initialize();
     this.anmatDataGenerationServiceClient = new AnmatGenerationServiceClient(this.context.Configuration);
 }
コード例 #3
0
 static AnmatDataService()
 {
     context = AnmatContext.Initialize();
 }