public void MethodWithLiteralArgument_HasValueDatasource()
        {
            IEngineConfigurationTypeMember member = mEngineConfigurationType.GetRegisteredMember(mSingleArgMethod);
            IEngineConfigurationDatasource configurationSource = member.GetDatasources().Single();
            IDatasource source = configurationSource.Build();

            Assert.AreEqual(typeof(ValueSource <object>), source.GetType());
        }
        public void MethodWithTwoArguments_HasCorrectDatasource(int skip, Type expectedType)
        {
            IEngineConfigurationTypeMember member       = mEngineConfigurationType.GetRegisteredMember(mDoubleArgMethod);
            IEngineConfigurationDatasource sourceConfig = member.GetDatasources().Skip(skip).First();
            IDatasource source = sourceConfig.Build();

            Assert.AreEqual(expectedType, source.GetType());
        }
Example #3
0
        public void SetSource_SetsCorrectDatasource()
        {
            IEngineConfigurationDatasource source = null;

            mMemberMock.Setup(x => x.SetDatasource(It.IsAny <IEngineConfigurationDatasource>())).Callback((IEngineConfigurationDatasource configSource) =>
            {
                source = configSource;
            });
            mContext.SetSource <TestSource>();
            IDatasource datasource = source.Build();

            Assert.AreEqual(typeof(TestSource), datasource.GetType());
        }