public void MapValueEnqueues()
        {
            var instance = QueueMapper <MyOptions, int> .Create(opt => opt.Queue);

            var options = new MyOptions();

            instance.MapValue(options, 10);
            options.Queue.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> ToQueue(
     Expression <Func <TOptions, Queue <TValue> > > expression)
 {
     Using(QueueMapper <TOptions, TValue> .Create(expression));
     return(Configuration);
 }
 public void CreateReturnsMultivaluedMapper()
 {
     QueueMapper <MyOptions, int> .Create(opt => opt.Queue).MultiValued.ShouldBeTrue();
 }
 public void CreateReturnsInstance()
 {
     QueueMapper <MyOptions, int> .Create(opt => opt.Queue).ShouldNotBeNull();
 }