Ejemplo n.º 1
0
        public void Comparer_LoadOrder_Unknown()
        {
            var loadOrder = new LoadOrder <OblivionMod>()
            {
                new OblivionMod(ModKey.FromNameAndExtension("Oblivion.esm")),
                new OblivionMod(ModKey.FromNameAndExtension("Knights.esm")),
            };
            FormKey k1      = FormKey.Factory("00C51A:MyMod.esm");
            FormKey k2      = FormKey.Factory("00C51B:Oblivion.esm");
            var     compare = FormKey.LoadOrderComparer(loadOrder);

            Assert.Throws <ArgumentOutOfRangeException>(() => compare.Compare(k1, k2));
        }
Ejemplo n.º 2
0
        public void Comparer_LoadOrder_FallbackGreater()
        {
            var loadOrder = new LoadOrder <OblivionMod>()
            {
                new OblivionMod(ModKey.FromNameAndExtension("Oblivion.esm")),
                new OblivionMod(ModKey.FromNameAndExtension("Knights.esm")),
            };
            FormKey k1      = FormKey.Factory("00C51A:Oblivion.esm");
            FormKey k2      = FormKey.Factory("00C51B:Oblivion.esm");
            var     compare = FormKey.LoadOrderComparer(loadOrder);

            Assert.True(compare.Compare(k2, k1) > 0);
        }
Ejemplo n.º 3
0
        public void Comparer_LoadOrder_Typical()
        {
            var loadOrder = new LoadOrder <OblivionMod>()
            {
                new OblivionMod(ModKey.FromNameAndExtension("Oblivion.esm")),
                new OblivionMod(ModKey.FromNameAndExtension("Knights.esm")),
            };
            FormKey k1      = FormKey.Factory("00C51A:Oblivion.esm");
            FormKey k2      = FormKey.Factory("00C51A:Knights.esm");
            var     compare = FormKey.LoadOrderComparer(loadOrder);

            Assert.True(compare.Compare(k1, k2) < 0);
        }
Ejemplo n.º 4
0
        public void Comparer_ModKeyList_Unknown()
        {
            List <ModKey> modKeys = new List <ModKey>()
            {
                ModKey.FromNameAndExtension("Oblivion.esm"),
                ModKey.FromNameAndExtension("Knights.esm"),
            };
            FormKey k1      = FormKey.Factory("00C51A:MyMod.esm");
            FormKey k2      = FormKey.Factory("00C51B:Oblivion.esm");
            var     compare = FormKey.LoadOrderComparer(modKeys);

            Assert.Throws <ArgumentOutOfRangeException>(() => compare.Compare(k1, k2));
        }
Ejemplo n.º 5
0
        public void Comparer_ModKeyList_FallbackGreater()
        {
            List <ModKey> modKeys = new List <ModKey>()
            {
                ModKey.FromNameAndExtension("Oblivion.esm"),
                ModKey.FromNameAndExtension("Knights.esm"),
            };
            FormKey k1      = FormKey.Factory("00C51A:Oblivion.esm");
            FormKey k2      = FormKey.Factory("00C51B:Oblivion.esm");
            var     compare = FormKey.LoadOrderComparer(modKeys);

            Assert.True(compare.Compare(k2, k1) > 0);
        }
Ejemplo n.º 6
0
        public void Comparer_ModKeyList_Typical()
        {
            List <ModKey> modKeys = new List <ModKey>()
            {
                ModKey.FromNameAndExtension("Oblivion.esm"),
                ModKey.FromNameAndExtension("Knights.esm"),
            };
            FormKey k1      = FormKey.Factory("00C51A:Oblivion.esm");
            FormKey k2      = FormKey.Factory("00C51A:Knights.esm");
            var     compare = FormKey.LoadOrderComparer(modKeys);

            Assert.True(compare.Compare(k1, k2) < 0);
        }