Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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());
        }
        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);
        }
Ejemplo n.º 4
0
        public void SimpleFieldClass_SomeOtherPropertyNotNull()
        {
            SimpleFieldClass fieldClass = mSession.Single <SimpleFieldClass>().Get();

            Assert.NotNull(fieldClass.SomeOtherField);
        }
        public void SimpleFieldClass_CanBeCreated()
        {
            SimpleFieldClass obj = mSession.Single <SimpleFieldClass>().Get();

            Assert.NotNull(obj);
        }