public void MapValueAdds()
        {
            var instance = SetMapper <MyOptions, int> .Create(opt => opt.Set);

            var options = new MyOptions();

            instance.MapValue(options, 10);
            options.Set.Single().ShouldBe(10);
        }
예제 #2
0
 /// <summary>
 /// Maps one or more argument values to the queue specified by the expression.
 /// </summary>
 /// <param name="expression">Expression that identifies the collection.</param>
 /// <returns>Configuration.</returns>
 public MultiValueArgumentConfiguration <TOptions, TValue> ToSet(
     Expression <Func <TOptions, ISet <TValue> > > expression)
 {
     Using(SetMapper <TOptions, TValue> .Create(expression));
     return(Configuration);
 }
 public void CreateReturnsMultivaluedMapper()
 {
     SetMapper <MyOptions, int> .Create(opt => opt.Set).MultiValued.ShouldBeTrue();
 }
 public void CreateReturnsInstance()
 {
     SetMapper <MyOptions, int> .Create(opt => opt.Set).ShouldNotBeNull();
 }