コード例 #1
0
 public void LoadOverrideBuildDoesntExistTest()
 {
     Assert.ThrowsException <FileNotFoundException>(() =>
     {
         HeroOverrideLoader overrideLoader = new HeroOverrideLoader(13000);
         overrideLoader.Load("blah-blah.xml");
     });
 }
コード例 #2
0
        public void LoadOverrideHasBuildLowerThanLowTest()
        {
            HeroOverrideLoader overrideLoader = new HeroOverrideLoader(1000);

            overrideLoader.Load(OverrideFileNameSuffix);

            Assert.IsNotNull(overrideLoader);
            Assert.AreEqual(7, overrideLoader.Count);
            Assert.AreEqual(HeroOverrideBuildTestFile11000, Path.GetFileName(overrideLoader.LoadedOverrideFileName));
        }
コード例 #3
0
        public void LoadOverrideHasBuildOpenNextLowestBuild11999Test()
        {
            HeroOverrideLoader overrideLoader = new HeroOverrideLoader(11999);

            overrideLoader.Load(OverrideFileNameSuffix);

            Assert.IsNotNull(overrideLoader);
            Assert.AreEqual(11, overrideLoader.Count);
            Assert.AreEqual(HeroOverrideBuildTestFile12000, Path.GetFileName(overrideLoader.LoadedOverrideFileName));
        }
コード例 #4
0
        public void LoadOverrideHasBuildInFileTest()
        {
            HeroOverrideLoader overrideLoader = new HeroOverrideLoader(12345);

            overrideLoader.Load(OverrideFileNameSuffix);

            Assert.IsNotNull(overrideLoader);
            Assert.AreEqual(1, overrideLoader.Count);
            Assert.AreEqual(HeroOverrideBuildTestFile12345, Path.GetFileName(overrideLoader.LoadedOverrideFileName));
        }
コード例 #5
0
        public void LoadOverrideFileTest()
        {
            HeroOverrideLoader overrideLoader = new HeroOverrideLoader(null);

            overrideLoader.Load(OverrideFileNameSuffix);

            Assert.IsNotNull(overrideLoader);
            Assert.AreEqual(4, overrideLoader.Count); // LittleLoco counts as one
            Assert.AreEqual(HeroOverrideTestFile, Path.GetFileName(overrideLoader.LoadedOverrideFileName));
        }
コード例 #6
0
        public void LoadOverrideHasBuildHighestDefaultBuildTest()
        {
            HeroOverrideLoader overrideLoader = new HeroOverrideLoader(13000);

            overrideLoader.Load(OverrideFileNameSuffix);

            Assert.IsNotNull(overrideLoader);
            Assert.AreEqual(4, overrideLoader.Count);
            Assert.AreEqual(HeroOverrideTestFile, Path.GetFileName(overrideLoader.LoadedOverrideFileName));
        }