Ejemplo n.º 1
0
        public void AttachState_NewState()
        {
            SecurableClassDefinition classDefinition = _testHelper.CreateOrderClassDefinition();
            StateCombination         combination     = _testHelper.CreateStateCombination(classDefinition);
            StatePropertyDefinition  property        = _testHelper.CreateTestProperty();

            using (_testHelper.Transaction.CreateSubTransaction().EnterDiscardingScope())
            {
                combination.AttachState(property["Test1"]);

                var states = combination.GetStates();
                Assert.That(states.Length, Is.EqualTo(1));
                Assert.That(states[0], Is.SameAs(property["Test1"]));
            }
        }