Пример #1
0
        public void HasAnyGreaterOrEqualValuesTest()
        {
            var b = new StatCollection <ST>(StatCollectionType.Base);

            b[ST.A] = 10;
            b[ST.B] = 11;

            foreach (var c in CreateStatCollections())
            {
                c[ST.A] = 10;
                c[ST.B] = 11;

                Assert.IsTrue(c.HasAnyGreaterOrEqualValues(b));
                Assert.IsTrue(b.HasAnyGreaterOrEqualValues(c));

                c[ST.A] = 11;
                Assert.IsTrue(c.HasAnyGreaterOrEqualValues(b));
                Assert.IsTrue(b.HasAnyGreaterOrEqualValues(c));

                c[ST.A] = 10;
                c[ST.B] = 12;
                Assert.IsTrue(c.HasAnyGreaterOrEqualValues(b));
                Assert.IsTrue(b.HasAnyGreaterOrEqualValues(c));

                c[ST.A] = 11;
                c[ST.B] = 12;
                Assert.IsTrue(c.HasAnyGreaterOrEqualValues(b));
                Assert.IsFalse(b.HasAnyGreaterOrEqualValues(c));

                c[ST.A] = 9;
                c[ST.B] = 12;
                Assert.IsTrue(c.HasAnyGreaterOrEqualValues(b));
                Assert.IsTrue(b.HasAnyGreaterOrEqualValues(c));

                c[ST.A] = 10;
                c[ST.B] = 10;
                Assert.IsTrue(c.HasAnyGreaterOrEqualValues(b));
                Assert.IsTrue(b.HasAnyGreaterOrEqualValues(c));

                c[ST.A] = 5;
                c[ST.B] = 5;
                Assert.IsFalse(c.HasAnyGreaterOrEqualValues(b));
                Assert.IsTrue(b.HasAnyGreaterOrEqualValues(c));
            }
        }
Пример #2
0
        public void HasAnyGreaterOrEqualValuesTest()
        {
            var b = new StatCollection<ST>(StatCollectionType.Base);
            b[ST.A] = 10;
            b[ST.B] = 11;

            foreach (var c in CreateStatCollections())
            {
                c[ST.A] = 10;
                c[ST.B] = 11;

                Assert.IsTrue(c.HasAnyGreaterOrEqualValues(b));
                Assert.IsTrue(b.HasAnyGreaterOrEqualValues(c));

                c[ST.A] = 11;
                Assert.IsTrue(c.HasAnyGreaterOrEqualValues(b));
                Assert.IsTrue(b.HasAnyGreaterOrEqualValues(c));

                c[ST.A] = 10;
                c[ST.B] = 12;
                Assert.IsTrue(c.HasAnyGreaterOrEqualValues(b));
                Assert.IsTrue(b.HasAnyGreaterOrEqualValues(c));

                c[ST.A] = 11;
                c[ST.B] = 12;
                Assert.IsTrue(c.HasAnyGreaterOrEqualValues(b));
                Assert.IsFalse(b.HasAnyGreaterOrEqualValues(c));

                c[ST.A] = 9;
                c[ST.B] = 12;
                Assert.IsTrue(c.HasAnyGreaterOrEqualValues(b));
                Assert.IsTrue(b.HasAnyGreaterOrEqualValues(c));

                c[ST.A] = 10;
                c[ST.B] = 10;
                Assert.IsTrue(c.HasAnyGreaterOrEqualValues(b));
                Assert.IsTrue(b.HasAnyGreaterOrEqualValues(c));

                c[ST.A] = 5;
                c[ST.B] = 5;
                Assert.IsFalse(c.HasAnyGreaterOrEqualValues(b));
                Assert.IsTrue(b.HasAnyGreaterOrEqualValues(c));
            }
        }