public void StateProperties_IsReadOnly() { AccessControlTestHelper testHelper = new AccessControlTestHelper(); using (testHelper.Transaction.EnterNonDiscardingScope()) { SecurableClassDefinition orderClass = testHelper.CreateOrderClassDefinitionWithProperties(); Assert.That(((ICollection <StatePropertyDefinition>)orderClass.StateProperties).IsReadOnly, Is.True); } }
public void StateProperties_OrderStateAndPaymentState() { AccessControlTestHelper testHelper = new AccessControlTestHelper(); using (testHelper.Transaction.EnterNonDiscardingScope()) { SecurableClassDefinition orderClass = testHelper.CreateOrderClassDefinitionWithProperties(); Assert.That(orderClass.StateProperties.Count, Is.EqualTo(AccessControlTestHelper.OrderClassPropertyCount)); } }
public void StateProperties_IsNotCached() { AccessControlTestHelper testHelper = new AccessControlTestHelper(); using (testHelper.Transaction.EnterNonDiscardingScope()) { SecurableClassDefinition orderClass = testHelper.CreateOrderClassDefinitionWithProperties(); var firstCollection = orderClass.StateProperties; var secondCollection = orderClass.StateProperties; Assert.That(secondCollection, Is.Not.SameAs(firstCollection)); } }