Esempio n. 1
0
        /// <summary>
        /// Gets the mock MT response group.
        /// </summary>
        /// <param name="fname">The fname.</param>
        /// <returns>list of mock MT responses</returns>
        public static IList<IResponse> GetMockMTResponseGroup(string fname)
        {
            IList<IResponse> responses = new List<IResponse>();
             string[] messages = new[] { "+updated", "text U", "fname " + fname, "newline", "-updated" };
             foreach (string s in messages)
             {
            MTMessageResponse m = new MTMessageResponse();
            m.Initialize(new List<string> { s });
            responses.Add(m);
             }

             return responses;
        }
 public void TestMessageTagResponse()
 {
     MTMessageResponse response = new MTMessageResponse();
      ResponseTest(response, ResponseType.MTMessage, 1, "My message", new List<string> { "My message" });
      Assert.AreEqual("My message", response.Message);
 }
        public void TestRemoveProcessedResponses()
        {
            IResponse r1 = new MTMessageResponse();
             IResponse r2 = new OkResponse();
             r1.Processed = true;
             r2.Processed = false;

             _cmdbase.Responses = new List<IResponse> { r1, r2 };
             _cmdbase.RemoveProcessedResponses();
             Assert.AreEqual(1, _cmdbase.Responses.Count);
        }