Ejemplo n.º 1
0
 public void A_Sum_must_work_when_using_Source_Sum_and_Flow_Sum_and_Sink_Sum()
 {
     this.AssertAllStagesStopped(() =>
     {
         var t = SumSource.Via(SumFlow).RunWith(SumSink, Materializer);
         t.Wait(TimeSpan.FromSeconds(3)).Should().BeTrue();
         t.Result.Should().Be(Expected);
     }, Materializer);
 }
Ejemplo n.º 2
0
        public async Task OnGetAsync()
        {
            // different type mapping

            var source = new Source
            {
                Value1 = "5",
                Value2 = "20/08/2020",
                Value3 = "System.Linq"
            };

            Destination result = _mapper.Map <Source, Destination>(source);

            // custom value resolver mapping

            var sumSource = new SumSource
            {
                Value1 = 10,
                Value2 = 11,
            };

            SumDestination sumDestination = _mapper.Map <SumSource, SumDestination>(sumSource);
        }