Exemple #1
0
        public void InitializePrepocessing_StateUnderTest_ExpectedBehavior()
        {
            // Arrange
            IET_Engine eT_Engine = this.CreateET_Engine();

            // Act
            bool result = eT_Engine.InitializePrepocessing();

            // Assert
            Assert.IsTrue(result);
        }
Exemple #2
0
        public void PerformTransformation_StateUnderTest_ExpectedBehavior()
        {
            // Arrange
            IET_Engine eT_Engine = this.CreateET_Engine();
            bool       result    = false;

            if (eT_Engine.RunDataAnalysis() && eT_Engine.InitializePrepocessing())
            {
                result = eT_Engine.PerformTransformation();
            }
            // Act

            // Assert
            Assert.IsTrue(result);
        }
Exemple #3
0
        public void PerformAutoClean_StateUnderTest_ExpectedBehavior()
        {
            // Arrange
            IET_Engine eT_Engine = this.CreateET_Engine();

            string csvTypeDef = null;
            int    attempt    = 0;

            // Act
            bool result = eT_Engine.InitializePrepocessing();

            result = eT_Engine.PerformAutoClean(
                runtimeSettings.DataSourceFileName,
                csvTypeDef,
                attempt);

            // Assert
            Assert.IsTrue(result);
        }
Exemple #4
0
        private static void Main(string[] args)
        {
            EtLogger logger = new EtLogger(new ConsoleProgressBar());

            logger.Log("=> Starting Custom CSV Et_Tool : ", EventLevel.LogAlways);
            IDiskIOHandler diskIOHandler   = new DiskIOHandler();
            RuntimeArgs    runtimeSettings = JsonConvert.DeserializeObject <RuntimeArgs>(diskIOHandler.FileReadAllText("runtimeConfig.Json"));

            IServiceCollection services = new ServiceCollection();

            services.AddSingleton(runtimeSettings);
            services.MainInjection();
            IServiceProvider serviceProvider = services.BuildServiceProvider();
            IET_Engine       engine          = serviceProvider.GetRequiredService <IET_Engine>();

            if (engine.RunDataAnalysis() && engine.InitializePrepocessing())
            {
                engine.PerformTransformation();
            }
            logger.LogInformation("Press Enter to Exit");
            Console.ReadLine();

            /*
             * 1. Load Configurations
             *      Get Emit Configuration
             *          [
             *          destination type
             *          destination colums
             *          ]
             *      Get Ingest Configuration
             *          [
             *          Load Main Data Source
             *          Load Lookups
             *          Load Transformation Lookups
             *          ]
             *
             * 2. Run Extraction Phase
             * 3. Run Transformation Phase
             * 4. Emit OutPut
             * 5. CheckSum Output , Input
             *
             */
        }