Exemple #1
0
        public void PropertyValueChanged()
        {
            EventSinkWithMock.Expect(mock => mock.RaisePropertyValueChangedEvent(_domainObject, _propertyDefinition, "oldValue", "newValue"));
            EventSinkWithMock.Replay();

            EventListener.PropertyValueChanged(_dataContainer, _propertyDefinition, "oldValue", "newValue");

            EventSinkWithMock.VerifyAllExpectations();
        }
Exemple #2
0
        public void PropertyValueRead()
        {
            EventSinkWithMock.Expect(mock => mock.RaisePropertyValueReadEvent(_domainObject, _propertyDefinition, "value", ValueAccess.Original));
            EventSinkWithMock.Replay();

            EventListener.PropertyValueRead(_dataContainer, _propertyDefinition, "value", ValueAccess.Original);

            EventSinkWithMock.VerifyAllExpectations();
        }
Exemple #3
0
        public void StateUpdated()
        {
            EventSinkWithMock.Expect(mock => mock.RaiseDataContainerStateUpdatedEvent(_dataContainer, StateType.New));
            EventSinkWithMock.Replay();

            EventListener.StateUpdated(_dataContainer, StateType.New);

            EventSinkWithMock.VerifyAllExpectations();
        }
Exemple #4
0
        public void PropertyValueChanging_WithObjectIDProperty_DoesNotRaiseEvent()
        {
            var propertyDefinition = PropertyDefinitionObjectMother.CreateForFakePropertyInfo_ObjectID();

            EventSinkWithMock.Replay();

            EventListener.PropertyValueChanging(_dataContainer, propertyDefinition, "oldValue", "newValue");

            EventSinkWithMock.VerifyAllExpectations();
        }