Ejemplo n.º 1
0
        public void Toggle_is_SymmetricExcept()
        {
            CKTrait m = Context.FindOrCreate("Beta+Alpha+Fridge+Combo");

            Assert.That(m.SymmetricExcept(Context.FindOrCreate("Beta")).ToString() == "Alpha+Combo+Fridge");
            Assert.That(m.SymmetricExcept(Context.FindOrCreate("Fridge+Combo")).ToString() == "Alpha+Beta");
            Assert.That(m.SymmetricExcept(Context.FindOrCreate("Beta+Fridge+Combo")).ToString() == "Alpha");
            Assert.That(m.SymmetricExcept(Context.FindOrCreate("Beta+Fridge+Combo+Alpha")).ToString() == "");

            Assert.That(m.SymmetricExcept(Context.FindOrCreate("")).ToString() == "Alpha+Beta+Combo+Fridge");
            Assert.That(m.SymmetricExcept(Context.FindOrCreate("Xtra")).ToString() == "Alpha+Beta+Combo+Fridge+Xtra");
            Assert.That(m.SymmetricExcept(Context.FindOrCreate("Alpha+Xtra")).ToString() == "Beta+Combo+Fridge+Xtra");
            Assert.That(m.SymmetricExcept(Context.FindOrCreate("Zenon+Alpha+Xtra+Fridge")).ToString() == "Beta+Combo+Xtra+Zenon");
        }
Ejemplo n.º 2
0
        public void Toggle_is_SymmetricExcept()
        {
            var c = ContextWithPlusSeparator();
            CKTrait m = c.FindOrCreate( "Beta+Alpha+Fridge+Combo" );
            m.SymmetricExcept( c.FindOrCreate( "Beta" ) ).ToString().Should().Be( "Alpha+Combo+Fridge" );
            m.SymmetricExcept( c.FindOrCreate( "Fridge+Combo" ) ).ToString().Should().Be( "Alpha+Beta" );
            m.SymmetricExcept( c.FindOrCreate( "Beta+Fridge+Combo" ) ).ToString().Should().Be( "Alpha" );
            m.SymmetricExcept( c.FindOrCreate( "Beta+Fridge+Combo+Alpha" ) ).ToString().Should().Be( "" );

            m.SymmetricExcept( c.FindOrCreate( "" ) ).ToString().Should().Be( "Alpha+Beta+Combo+Fridge" );
            m.SymmetricExcept( c.FindOrCreate( "Xtra" ) ).ToString().Should().Be( "Alpha+Beta+Combo+Fridge+Xtra" );
            m.SymmetricExcept( c.FindOrCreate( "Alpha+Xtra" ) ).ToString().Should().Be( "Beta+Combo+Fridge+Xtra" );
            m.SymmetricExcept( c.FindOrCreate( "Zenon+Alpha+Xtra+Fridge" ) ).ToString().Should().Be( "Beta+Combo+Xtra+Zenon" );
        }