public void HasAllGreaterOrEqualValuesTest() { 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.HasAllGreaterOrEqualValues(b)); Assert.IsTrue(b.HasAllGreaterOrEqualValues(c)); c[ST.A] = 11; Assert.IsTrue(c.HasAllGreaterOrEqualValues(b)); Assert.IsFalse(b.HasAllGreaterOrEqualValues(c)); c[ST.A] = 10; c[ST.B] = 12; Assert.IsTrue(c.HasAllGreaterOrEqualValues(b)); Assert.IsFalse(b.HasAllGreaterOrEqualValues(c)); c[ST.A] = 11; c[ST.B] = 12; Assert.IsTrue(c.HasAllGreaterOrEqualValues(b)); Assert.IsFalse(b.HasAllGreaterOrEqualValues(c)); c[ST.A] = 9; c[ST.B] = 12; Assert.IsFalse(c.HasAllGreaterOrEqualValues(b)); Assert.IsFalse(b.HasAllGreaterOrEqualValues(c)); c[ST.A] = 10; c[ST.B] = 10; Assert.IsFalse(c.HasAllGreaterOrEqualValues(b)); Assert.IsTrue(b.HasAllGreaterOrEqualValues(c)); c[ST.A] = 5; c[ST.B] = 5; Assert.IsFalse(c.HasAllGreaterOrEqualValues(b)); Assert.IsTrue(b.HasAllGreaterOrEqualValues(c)); } }
public void HasAllGreaterOrEqualValuesTest() { 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.HasAllGreaterOrEqualValues(b)); Assert.IsTrue(b.HasAllGreaterOrEqualValues(c)); c[ST.A] = 11; Assert.IsTrue(c.HasAllGreaterOrEqualValues(b)); Assert.IsFalse(b.HasAllGreaterOrEqualValues(c)); c[ST.A] = 10; c[ST.B] = 12; Assert.IsTrue(c.HasAllGreaterOrEqualValues(b)); Assert.IsFalse(b.HasAllGreaterOrEqualValues(c)); c[ST.A] = 11; c[ST.B] = 12; Assert.IsTrue(c.HasAllGreaterOrEqualValues(b)); Assert.IsFalse(b.HasAllGreaterOrEqualValues(c)); c[ST.A] = 9; c[ST.B] = 12; Assert.IsFalse(c.HasAllGreaterOrEqualValues(b)); Assert.IsFalse(b.HasAllGreaterOrEqualValues(c)); c[ST.A] = 10; c[ST.B] = 10; Assert.IsFalse(c.HasAllGreaterOrEqualValues(b)); Assert.IsTrue(b.HasAllGreaterOrEqualValues(c)); c[ST.A] = 5; c[ST.B] = 5; Assert.IsFalse(c.HasAllGreaterOrEqualValues(b)); Assert.IsTrue(b.HasAllGreaterOrEqualValues(c)); } }