public void test_Intersect_between_traits() { CKTrait m1 = Context.FindOrCreate("Beta+Alpha+Fridge+Combo"); CKTrait m2 = Context.FindOrCreate("Xtra+Combo+Another+Fridge+Alt"); Assert.That(m1.Intersect(m2).ToString() == "Combo+Fridge", "Works as expected :-)"); Assert.That(m2.Intersect(m1) == m1.Intersect(m2), "Same object in both calls."); Assert.That(m2.Intersect(Context.EmptyTrait) == Context.EmptyTrait, "Intersecting empty gives empty."); }
public void test_Intersect_between_traits() { var c = ContextWithPlusSeparator(); CKTrait m1 = c.FindOrCreate("Beta+Alpha+Fridge+Combo"); CKTrait m2 = c.FindOrCreate("Xtra+Combo+Another+Fridge+Alt"); m1.Intersect(m2).ToString().Should().Be("Combo+Fridge", "Works as expected :-)"); m2.Intersect(m1).Should().BeSameAs(m1.Intersect(m2), "Same object in both calls."); m2.Intersect(c.EmptyTrait).Should().BeSameAs(c.EmptyTrait, "Intersecting empty gives empty."); }