public void MapValueAdds() { var instance = StackMapper <MyOptions, int> .Create(opt => opt.Stack); var options = new MyOptions(); instance.MapValue(options, 10); options.Stack.Single().ShouldBe(10); }
/// <summary> /// Maps one or more argument values to the stack specified by the expression. /// </summary> /// <param name="expression">Expression that identifies the collection.</param> /// <returns>Configuration.</returns> public MultiValueArgumentConfiguration <TOptions, TValue> ToStack( Expression <Func <TOptions, Stack <TValue> > > expression) { Using(StackMapper <TOptions, TValue> .Create(expression)); return(Configuration); }
public void CreateReturnsMultivaluedMapper() { StackMapper <MyOptions, int> .Create(opt => opt.Stack).MultiValued.ShouldBeTrue(); }
public void CreateReturnsInstance() { StackMapper <MyOptions, int> .Create(opt => opt.Stack).ShouldNotBeNull(); }