コード例 #1
0
        public void Export()
        {
            // Assign
            var outputPath = Path.Combine(TestContext.DeploymentDirectory, "Test.xls");
            if( File.Exists(outputPath))
            {
                File.Delete(outputPath);
            }

            var exporter = new ResourceExport(TestContext.DeploymentDirectory, "en", outputPath);

            // Act
            exporter.Export();

            // Assert
            Assert.IsTrue(File.Exists(outputPath));
        }
コード例 #2
0
 static void Main(string[] args)
 {
     var options = new CommandLineOptions();
     ICommandLineParser parser = new CommandLineParser();
     if (parser.ParseArguments(args, options, Console.Out))
     {
         if (options.Export)
         {
             var export = new ResourceExport(options.InputDirectory, options.Language, options.XlsFile);
             export.Export();
         }
         else
         {
             var importer = new ResourceImport(options.XlsFile, options.Language, options.InputDirectory);
             importer.Import();
         }
     }
 }