Ejemplo n.º 1
0
        public static TAGFileConverter ReadTAGFileFullPath(string fileName, bool treatAsJohnDoeMachine = false)
        {
            var converter = new TAGFileConverter();

            using var fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);
            converter.ExecuteLegacyTAGFile(fileName, fs, Guid.NewGuid(), treatAsJohnDoeMachine);

            return(converter);
        }
Ejemplo n.º 2
0
        public static TAGFileConverter ReadTAGFile(string fileName, Guid assetUid, bool isJohnDoe)
        {
            var converter = new TAGFileConverter();

            using var fs = new FileStream(Path.Combine("TestData", "TAGFiles", fileName), FileMode.Open, FileAccess.Read);
            converter.ExecuteLegacyTAGFile(fileName, fs, assetUid, isJohnDoe);

            return(converter);
        }
Ejemplo n.º 3
0
        public static TAGFileConverter ReadTAGFile(string subFolder, string fileName, bool treatAsJohnDoeMachine = false)
        {
            var converter = new TAGFileConverter();
            var fn        = Path.Combine("TestData", "TAGFiles", subFolder, fileName);

            using var fs = new FileStream(fn, FileMode.Open, FileAccess.Read);
            converter.ExecuteLegacyTAGFile(fileName, fs, Guid.NewGuid(), treatAsJohnDoeMachine);

            return(converter);
        }
Ejemplo n.º 4
0
        public void Test_TAGFileConverter_Creation()
        {
            var converter = new TAGFileConverter();

            Assert.True(converter.Machines != null &&
                        converter.SiteModel != null &&
                        converter.SiteModelGridAggregator != null &&
                        converter.MachinesTargetValueChangesAggregator != null &&
                        converter.ReadResult == TAGReadResult.NoError &&
                        converter.ProcessedCellPassCount == 0 &&
                        converter.ProcessedEpochCount == 0,
                        "TAGFileConverter not created as expected");
        }