public void SetBodyWorks() { string body = "body text"; Routable routable = this.CreateMessage(); routable.SetBody <string>(body); Assert.AreEqual(body, routable.Body); }
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(); }
public void Process(Routable routable) { routable.SetBody <string>("Kyameru testing...sorry #notsorry"); }
public void Process(Routable routable) { routable.SetBody <string>(System.Text.Encoding.UTF8.GetString( (byte[])routable.Body)); this.Log(LogLevel.Information, routable.Headers["DataType"]); }
public void Process(Routable item) { GlobalCalls.Calls.Add("TO"); item.SetBody <string>("Injected Test Complete"); this.OnLog?.Invoke(this, new Log(LogLevel.Information, "TO")); }
public bool IsEqual(Routable routable) { routable.SetBody <T>(item); return(expected == routable.Headers["DataType"]); }