static void Main(string[] args) { Console.WriteLine("Hello World!"); BattleTechParser.Lib.Parser parserFromOriginalCSV = new Lib.Parser(); BattleTechParser.Lib.Parser parserFromJsonFiles = new Lib.Parser(); BattleTechParser.Lib.Parser parserFromTranslatedCSV = new Lib.Parser(); BattleTechParser.Lib.Parser parserFromGameTips = new Lib.Parser(); BattleTechParser.Lib.Parser parserFromSQLs = new Lib.Parser(); parserFromOriginalCSV.AddCSVFromFilePath(@"D:\SteamLibrary\steamapps\common\BATTLETECH\BattleTech_Data\StreamingAssets\data\localization\strings_fr-FR - 복사본.csv"); parserFromJsonFiles.AddJsonFromFolderPath(@"D:\SteamLibrary\steamapps\common\BATTLETECH\BattleTech_Data\AllTextRelatedAsset"); parserFromJsonFiles.AddJsonFromFolderPath(@"D:\SteamLibrary\steamapps\common\BATTLETECH\BattleTech_Data\StreamingAssets\data"); parserFromGameTips.AddGameTipsFromFilePath(@"D:\SteamLibrary\steamapps\common\BATTLETECH\BattleTech_Data\StreamingAssets\GameTips\general.txt"); parserFromSQLs.AddSQLFromFilePath(@"D:\SteamLibrary\steamapps\common\BATTLETECH\BattleTech_Data\StreamingAssets\MDD\data\transactions.sql"); parserFromSQLs.AddSQLFromFilePath(@"D:\SteamLibrary\steamapps\common\BATTLETECH\BattleTech_Data\StreamingAssets\MDD\data\tagdata.sql"); BattleTechParser.Lib.Parser parserEnglish = (parserFromJsonFiles + parserFromGameTips + parserFromSQLs); parserFromTranslatedCSV.AddCSVFromFilePath(@"d:\Downloads\strings_fr-FR.csv"); BattleTechParser.Lib.Parser mergedParser = parserFromOriginalCSV.Merge(parserEnglish); BattleTechParser.Lib.Parser mergedParser2 = mergedParser.Merge(parserFromTranslatedCSV); string tempCSV = mergedParser2.ToCSVFormat(); string tempCSV2 = parserEnglish.ToCSVFormat(); string tempCSV3 = (parserFromTranslatedCSV - parserFromOriginalCSV).ToCSVFormat(); string tempCSV4 = (parserFromOriginalCSV - parserEnglish - parserFromTranslatedCSV).ToCSVFormat(); string tempCSV5 = (parserEnglish - parserFromOriginalCSV).ToCSVFormat(); Console.WriteLine("Hello World!"); }
public void BattleTechParser_FromPot() { string potStr = battleTechParserFull.ToPotFormat(); BattleTechParser.Lib.Parser battleTechParser1 = new BattleTechParser.Lib.Parser(); battleTechParser1.FromPotString(potStr); Assert.AreEqual(battleTechParserFull, battleTechParser1); }
public void BattleTechParser_ToCSV() { string csvStr = battleTechParserFull.ToCSVFormat(); BattleTechParser.Lib.Parser parser = new BattleTechParser.Lib.Parser(); parser.AddCSVFromString(csvStr); Assert.AreEqual(csvStr, parser.ToCSVFormat()); }
public void BattleTechParser_Merge() { BattleTechParser.Lib.Parser battleTechParserMergeFrom = new BattleTechParser.Lib.Parser(); battleTechParserMergeFrom.AddCSVFromFilePath("BattleTechParserCan_Merge.csv"); BattleTechParser.Lib.Parser battleTechParserMergeReference = new BattleTechParser.Lib.Parser(); battleTechParserMergeReference.AddCSVFromFilePath("BattleTechParserCan_Merge_Reference.csv"); Assert.AreEqual(battleTechParserMergeReference, battleTechParserFull.Merge(battleTechParserMergeFrom)); }
public void BattleTechParser_Equals() { BattleTechParser.Lib.Parser battleTechParser1 = new BattleTechParser.Lib.Parser(); battleTechParser1.AddCSVFromFilePath("BattleTechParserCan_AddCSVFromFilePath.csv"); Assert.AreEqual(battleTechParserFull, battleTechParser1); Assert.AreNotEqual(battleTechParserFull, battleTechParserFullMinus2); Assert.AreNotEqual(battleTechParserFull, battleTechParserOnly2); Assert.AreNotEqual(battleTechParserOnly2, battleTechParserOnly2SomeDiff); }
public void BattleTechParser_AddJsonFromFolderPath() { BattleTechParser.Lib.Parser battleTechParser = new BattleTechParser.Lib.Parser(); Assert.IsTrue(battleTechParser.AddJsonFromFolderPath(@"D:\SteamLibrary\steamapps\common\BATTLETECH\BattleTech_Data\StreamingAssets\data")); }
public void BattleTechParserCannot_AddCSVFromFilePath() { BattleTechParser.Lib.Parser battleTechParser = new BattleTechParser.Lib.Parser(); Assert.IsFalse(battleTechParser.AddCSVFromFilePath("ndjfnqlaeiurnvoaliwjrngaoeurgbnaeljrgna.csv")); }
public void BattleTechParserCan_AddCSVFromFilePath() { BattleTechParser.Lib.Parser battleTechParser = new BattleTechParser.Lib.Parser(); Assert.IsTrue(battleTechParser.AddCSVFromFilePath("BattleTechParserCan_AddCSVFromFilePath.csv")); Assert.AreEqual(battleTechParser.Count, 26); }