public void GivenStateCodeCSVFileIncorrect_WhenAnalyze_ReturnsCustomException() { Factory factory = new ObjectFactory(); ICSVBuilder csvStates = factory.GetObject("CSVStateCensus", this.wrongStateCodeFileName, this.delimiter, this.csvStateCodeHeader); GetCSVData getCSVData = new GetCSVData(csvStates.NumberOfRecords); string actual = getCSVData.Invoke(); Assert.AreEqual("File Not Found!!!", actual); }
public void GivenStateCodeCSVFileCorrectCSVHeaderIncorrect_WhenAnalyze_ReturnsCustomException() { Factory factory = new ObjectFactory(); ICSVBuilder csvStates = factory.GetObject("CSVStateCensus", this.stateCodePath, this.delimiter, this.wrongCSVStateCodeHeader); Console.WriteLine("CSVStates: " + csvStates.NumberOfRecords()); GetCSVData getCSVData = new GetCSVData(csvStates.NumberOfRecords); string actual = getCSVData.Invoke(); Assert.AreEqual("CSV Header Incorrect !!!", csvStates.NumberOfRecords()); }
public void GivenStateCodeCSVFile_WhenAnalyze_NumberOfRecordMatches() { StateCensusAnalyzer stateCensusAnalyzer = new StateCensusAnalyzer(this.stateCodePath); Factory factory = new ObjectFactory(); ICSVBuilder csvStates = factory.GetObject("CSVStateCensus", this.stateCodePath, this.delimiter, this.csvStateCodeHeader); GetCSVData getCSVData = new GetCSVData(csvStates.NumberOfRecords); string expected = getCSVData.Invoke(); string actual = stateCensusAnalyzer.NumberOfRecords(); Assert.AreEqual(expected, actual); }
public void GivenStateCensusCSVFileCorrectTypeIncorrect_WhenAnalyze_ReturnsCustomException() { Factory factory = new ObjectFactory(); ICSVBuilder csvStateCensus = factory.GetObject("CSVStateCensus", this.wrongStateCensusFileType, this.delimiter, this.csvStateCensusHeader); Console.WriteLine("CSVStateCensus: " + csvStateCensus.NumberOfRecords()); GetCSVData getCSVData = new GetCSVData(csvStateCensus.NumberOfRecords); string actual = getCSVData.Invoke(); Assert.AreEqual("Incorrect File Format!!!", actual); }
static void AndroidBuild(BuildOptions option = BuildOptions.None) { SetAndroidNDKPath(); GetCSVData csv = new GetCSVData(); csv.GetNewVersion(out bundleVersionCode, out gameVersion); PlayerSettings.Android.bundleVersionCode = bundleVersionCode; PlayerSettings.bundleVersion = gameVersion.ToString(); string androidDir = "/Output"; char sep = Path.DirectorySeparatorChar; string BUILD_TARGET_PATH = Path.GetFullPath(".") + sep + TARGET_DIR + androidDir + string.Format("/{2}AndroidBuild_{0}_{1}.apk", PlayerSettings.Android.bundleVersionCode, PlayerSettings.bundleVersion, buildDivision); string copyAndMove = Path.GetFullPath(".") + sep + TARGET_DIR + buildBackupDivisionLocation + string.Format("/{2}AndroidBuild_{0}_{1}.apk", PlayerSettings.Android.bundleVersionCode, PlayerSettings.bundleVersion, buildDivision); // 윈도우의 슬래시가 문제를 일으키기에 슬래시로 변환해줌 // 맥에선 쓸 일이 없지만 혹시 또 윈도우 환경으로 돌아갈 경우를 대비하여 놔둠 #if UNITY_EDITOR_WIN //BUILD_TARGET_PATH = BUILD_TARGET_PATH.Replace("\\","/"); //copyAndMove = copyAndMove.Replace("\\", "/"); #endif DirectoryInfo outputDirectory = new DirectoryInfo(Path.GetFullPath(".") + sep + TARGET_DIR + androidDir); DirectoryInfo backupDirectory = new DirectoryInfo(Path.GetFullPath(".") + sep + TARGET_DIR + buildBackupDivisionLocation); DirectoryInfo tempDirectory = new DirectoryInfo(Path.GetFullPath(".") + sep + TEMP_DIR); FolderSershAndCreate(outputDirectory); FolderSershAndCreate(backupDirectory); FolderSershAndCreate(tempDirectory); KeystoreSetting(); GenericBuild(SCENES, BUILD_TARGET_PATH, BuildTargetGroup.Android, BuildTarget.Android, option, "Android_BuildReport" + "_" + PlayerSettings.Android.bundleVersionCode + "_" + PlayerSettings.bundleVersion); // /Output에서 나온 앱을 Backup폴더로 복사함 File.Copy(BUILD_TARGET_PATH, copyAndMove); }