Example #1
0
        public void AddParamter(string queryName, string propertyName, ParameterCollection.FieldType type)
        {
            MappedParameter parameter = new MappedParameter();
            parameter.QueryName = queryName;
            parameter.PropertName = propertyName;
            parameter.Type = type;

            _parameters.Add(parameter);
        }
Example #2
0
        public async Task ResolveReturnsMappedValue()
        {
            // Arrange
            var flowContext   = Mock.Of <IFlowContext>();
            var baseParameter = Mock.Of <IParameter>(o => o.Resolve(flowContext).Result == (object)"1337");
            var parameter     = new MappedParameter <int>(baseParameter);

            // Act
            var result = await parameter.Resolve(flowContext);

            // Assert
            result.Should().Be(1337);
        }