public void Enact_SetsFieldWithSourceValue()
        {
            mSourceMock.Setup(x => x.Next(It.IsAny<IGenerationContext>())).Returns("Test");

            SimpleFieldClass target = new SimpleFieldClass();
            mAction.Enact(mContext, target);
            Assert.AreEqual("Test", target.SomeField);
        }
        public void Enact_SetsFieldWithValue()
        {
            ObjectFieldSetFromValueAction action = new ObjectFieldSetFromValueAction((EngineTypeFieldMember)
                ReflectionHelper.GetMember<SimpleFieldClass>(x => x.SomeField), "Test");

            SimpleFieldClass target = new SimpleFieldClass();
            action.Enact(null, target);

            Assert.AreEqual("Test", target.SomeField);
        }
        public void Enact_CreateTypeFieldContext_Into_Session()
        {
            SimpleFieldClass target = new SimpleFieldClass();

            mAction.Enact(mContext, target);

            mSourceMock.Verify(x => x.Next(It.Is<IGenerationContext>(y =>
                y.Node is TypeFieldGenerationContextNode &&
                y.Node.Parent == mParentNode)),
                               Times.Once());
        }