Beispiel #1
0
        public void SetBodyWorks()
        {
            string   body     = "body text";
            Routable routable = this.CreateMessage();

            routable.SetBody <string>(body);
            Assert.AreEqual(body, routable.Body);
        }
Beispiel #2
0
        public void CanUploadFile(bool stringBody)
        {
            Mock <IWebRequestUtility> webRequestUtility = this.GetWebRequest();
            To       to       = new To(this.GetRoute().Headers, webRequestUtility.Object);
            Routable routable = new Routable(new Dictionary <string, string>()
            {
                { "SourceFile", "Test.txt" }
            },
                                             Encoding.UTF8.GetBytes("Hello")
                                             );

            if (stringBody)
            {
                routable.SetBody <string>("Hello");
            }

            to.Process(routable);
            webRequestUtility.VerifyAll();
        }
Beispiel #3
0
 public void Process(Routable routable)
 {
     routable.SetBody <string>("Kyameru testing...sorry #notsorry");
 }
Beispiel #4
0
 public void Process(Routable routable)
 {
     routable.SetBody <string>(System.Text.Encoding.UTF8.GetString(
                                   (byte[])routable.Body));
     this.Log(LogLevel.Information, routable.Headers["DataType"]);
 }
Beispiel #5
0
 public void Process(Routable item)
 {
     GlobalCalls.Calls.Add("TO");
     item.SetBody <string>("Injected Test Complete");
     this.OnLog?.Invoke(this, new Log(LogLevel.Information, "TO"));
 }
Beispiel #6
0
 public bool IsEqual(Routable routable)
 {
     routable.SetBody <T>(item);
     return(expected == routable.Headers["DataType"]);
 }