Пример #1
0
 public void testSuccessHeaderWithNoMeta()
 {
     Assert.Throws <SyntaxErrorException>(delegate { byte[] header = GeminiProtocols.GetHeader(StatusCode.SUCCESS); });
 }
Пример #2
0
 public void testSuccessHeaderWithSuppliedMeta()
 {
     byte[] header = GeminiProtocols.GetHeader(StatusCode.SUCCESS, "FOO SUCCEEDED");
     Assert.AreEqual(Encoding.UTF8.GetBytes("20 FOO SUCCEEDED\r\n"), header);
 }