public void windows() { spdyserver.Pack pack = new spdyserver.Pack(1); byte [] p = pack.windowsUpdate(1,1); spdyserver.Unpack un = new spdyserver.Unpack(); un.Extract(p); Dictionary<string, UInt32> a = un.getheader(); Assert.AreEqual(1, a["Size"]); }
public void syn_streamHeader() { spdyserver.Pack pack = new spdyserver.Pack(1); Dictionary<string, string> d = new Dictionary<string, string>(); d.Add("s1", "teste"); d.Add("23", "teste"); byte [] p = pack.synStream(0, 1, 0, 2, d); spdyserver.Unpack un = new spdyserver.Unpack(); un.Extract(p); Dictionary<string, UInt32> a = un.getheader(); Assert.AreEqual(0, a["Flag"]); }
public void ping() { spdyserver.Pack pack = new spdyserver.Pack(1); byte [] p = pack.ping(1); spdyserver.Unpack un = new spdyserver.Unpack(); un.Extract(p); Dictionary<string, UInt32> a = un.getheader(); Assert.AreEqual(1, a["ID"]); }
public void reset() { spdyserver.Pack pack = new spdyserver.Pack(1); byte [] p = pack.rstStream(0, 1, 0); spdyserver.Unpack un = new spdyserver.Unpack(); un.Extract(p); Dictionary<string, UInt32> a = un.getheader(); Assert.AreEqual(0, a["Status_code"]); }
public void data() { spdyserver.Pack pack = new spdyserver.Pack(1); byte [] b = new byte [4]; byte [] p = pack.data(1, 0, b); spdyserver.Unpack u = new spdyserver.Unpack(); u.Extract(p); Dictionary<string, UInt32> a = u.getheader(); Assert.AreEqual(4, a["Length"]); }