public void HasAllGreaterValuesTest()
        {
            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.IsFalse(c.HasAllGreaterValues(b));
                Assert.IsFalse(b.HasAllGreaterValues(c));

                c[ST.A] = 11;
                Assert.IsFalse(c.HasAllGreaterValues(b));
                Assert.IsFalse(b.HasAllGreaterValues(c));

                c[ST.A] = 10;
                c[ST.B] = 12;
                Assert.IsFalse(c.HasAllGreaterValues(b));
                Assert.IsFalse(b.HasAllGreaterValues(c));

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

                c[ST.A] = 9;
                c[ST.B] = 12;
                Assert.IsFalse(c.HasAllGreaterValues(b));
                Assert.IsFalse(b.HasAllGreaterValues(c));

                c[ST.A] = 10;
                c[ST.B] = 10;
                Assert.IsFalse(c.HasAllGreaterValues(b));
                Assert.IsFalse(b.HasAllGreaterValues(c));

                c[ST.A] = 5;
                c[ST.B] = 5;
                Assert.IsFalse(c.HasAllGreaterValues(b));
                Assert.IsTrue(b.HasAllGreaterValues(c));
            }
        }
Beispiel #2
0
        public void HasAllGreaterValuesTest()
        {
            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.IsFalse(c.HasAllGreaterValues(b));
                Assert.IsFalse(b.HasAllGreaterValues(c));

                c[ST.A] = 11;
                Assert.IsFalse(c.HasAllGreaterValues(b));
                Assert.IsFalse(b.HasAllGreaterValues(c));

                c[ST.A] = 10;
                c[ST.B] = 12;
                Assert.IsFalse(c.HasAllGreaterValues(b));
                Assert.IsFalse(b.HasAllGreaterValues(c));

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

                c[ST.A] = 9;
                c[ST.B] = 12;
                Assert.IsFalse(c.HasAllGreaterValues(b));
                Assert.IsFalse(b.HasAllGreaterValues(c));

                c[ST.A] = 10;
                c[ST.B] = 10;
                Assert.IsFalse(c.HasAllGreaterValues(b));
                Assert.IsFalse(b.HasAllGreaterValues(c));

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