Documentation Coverage Report
Current view: top level - Azure/Tests/Cqrs.Azure.ServiceBus.Tests.Integration - TestCommandSuccessHandler.cs Hit Total Coverage
Version: 2.2 Artefacts: 3 3 100.0 %
Date: 2017-09-22

          Line data    Source code
       1             : #region Copyright
       2             : // // -----------------------------------------------------------------------
       3             : // // <copyright company="Chinchilla Software Limited">
       4             : // //   Copyright Chinchilla Software Limited. All rights reserved.
       5             : // // </copyright>
       6             : // // -----------------------------------------------------------------------
       7             : #endregion
       8             : 
       9             : using System;
      10             : using System.Collections.Generic;
      11             : using Cqrs.Azure.ServiceBus.Tests.Unit;
      12             : using Cqrs.Messages;
      13             : 
      14             : namespace Cqrs.Azure.ServiceBus.Tests.Integration
      15             : {
      16             :         /// <summary>
      17             :         /// A Test <see cref="IMessageHandler{TMessage}"/> for handling <see cref="TestCommand"/>.
      18             :         /// </summary>
      19             :         public class TestCommandSuccessHandler : IMessageHandler<TestCommand>
      20           1 :         {
      21             :                 /// <summary>
      22             :                 /// Instantiate and initialise a new <see cref="TestCommandSuccessHandler"/> specifying the test flag container.
      23             :                 /// </summary>
      24             :                 /// <param name="testResponse">The test flag container.</param>
      25           1 :                 public TestCommandSuccessHandler(IDictionary<Guid, Tuple<bool, Exception>> testResponse)
      26             :                 {
      27             :                         TestResponse = testResponse;
      28             :                 }
      29             : 
      30             :                 /// <summary>
      31             :                 /// A local reference to the test flag container.
      32             :                 /// </summary>
      33             :                 protected IDictionary<Guid, Tuple<bool, Exception>> TestResponse { get; private set; }
      34             : 
      35             :                 #region Implementation of IHandler<in TestCommand>
      36             : 
      37             :                 /// <summary>
      38             :                 /// Sets a value into <see cref="TestResponse"/> so it can be reported back to the test class.
      39             :                 /// </summary>
      40           1 :                 public void Handle(TestCommand message)
      41             :                 {
      42             :                         TestResponse[message.Id] = new Tuple<bool, Exception>(true, null);
      43             :                 }
      44             : 
      45             :                 #endregion
      46             :         }
      47             : }

Generated by: LCOV version 1.10