public void OpenModFile2() { var cat = new CatFile(Path.Combine(_BaseDir, "PlaneFileModEnvironment")); using var ms = cat.OpenFile("libraries/foo_mod_personal_infomation/personal_infomation.xml"); using var fs = File.OpenRead(MakePath("PlaneFileModEnvironment/extensions/foo_mod/libraries/foo_mod_personal_infomation/personal_infomation.xml")); Assert.True(IsSameStream(ms, fs)); }
public void OpenVanillaFile3() { var cat = new CatFile(Path.Combine(_BaseDir, "VanillaEnvironment")); using var ms = cat.OpenFile("libraries/personal infomation/personal_infomation.xml"); using var fs = File.OpenRead(MakePath("VanillaEnvironmentOrig/01/libraries/personal infomation/personal_infomation.xml")); Assert.True(IsSameStream(ms, fs)); }
public void OpenVanillaFile5() { var ex = Assert.Throws <FileNotFoundException>(() => { var cat = new CatFile(Path.Combine(_BaseDir, "VanillaEnvironment")); using var ms = cat.OpenFile("libraries/not_exist.txt"); }); Assert.Contains("libraries/not_exist.txt", ex.Message); }