Example #1
0
        public void SetAndGet_Index()
        {
            StateCombination stateCombination = StateCombination.NewObject();

            stateCombination.Index = 1;
            Assert.That(stateCombination.Index, Is.EqualTo(1));
        }
Example #2
0
        public void AttachState_WithoutClassDefinition()
        {
            StateCombination        combination = StateCombination.NewObject();
            StatePropertyDefinition property    = _testHelper.CreateTestProperty();

            combination.AttachState(property["Test1"]);

            Assert.That(combination.GetStates().Length, Is.EqualTo(1));
        }
Example #3
0
 public void DomainObjectsAreSerializable()
 {
     CheckDomainObjectSerializability(delegate { return(AccessControlEntry.NewObject()); });
     CheckDomainObjectSerializability(delegate { return(StatefulAccessControlList.NewObject()); });
     CheckDomainObjectSerializability(delegate { return(Permission.NewObject()); });
     CheckDomainObjectSerializability(delegate { return(StateCombination.NewObject()); });
     CheckDomainObjectSerializability(delegate { return(StateUsage.NewObject()); });
     CheckDomainObjectSerializability(delegate { return(AbstractRoleDefinition.NewObject()); });
     CheckDomainObjectSerializability(delegate { return(AccessTypeDefinition.NewObject()); });
     CheckDomainObjectSerializability(delegate { return(AccessTypeReference.NewObject()); });
     CheckDomainObjectSerializability(delegate { return(Culture.NewObject("DE-DE")); });
     CheckDomainObjectSerializability(delegate { return(LocalizedName.NewObject("foo", Culture.NewObject("DE-DE"), SecurableClassDefinition.NewObject())); });
     CheckDomainObjectSerializability(delegate { return(SecurableClassDefinition.NewObject()); });
     CheckDomainObjectSerializability(delegate { return(StateDefinition.NewObject()); });
     CheckDomainObjectSerializability(delegate { return(StatePropertyDefinition.NewObject()); });
     CheckDomainObjectSerializability(delegate { return(StatePropertyReference.NewObject()); });
     CheckDomainObjectSerializability(delegate { return((Group)LifetimeService.NewObject(ClientTransaction.Current, typeof(Group), ParamList.Empty)); });
     CheckDomainObjectSerializability(delegate { return((GroupType)LifetimeService.NewObject(ClientTransaction.Current, typeof(GroupType), ParamList.Empty)); });
     CheckDomainObjectSerializability(delegate { return(GroupTypePosition.NewObject()); });
     CheckDomainObjectSerializability(delegate { return((Position)LifetimeService.NewObject(ClientTransaction.Current, typeof(Position), ParamList.Empty)); });
     CheckDomainObjectSerializability(delegate { return(Role.NewObject()); });
     CheckDomainObjectSerializability(delegate { return((Tenant)LifetimeService.NewObject(ClientTransaction.Current, typeof(Tenant), ParamList.Empty)); });
     CheckDomainObjectSerializability(delegate { return((User)LifetimeService.NewObject(ClientTransaction.Current, typeof(User), ParamList.Empty)); });
 }