Ejemplo n.º 1
0
 public void Appendでサイズ制限を超えるとContinueが返される(int limit, int size, RecvStatus recvStatus)
 {
     //setUp
     var sut = new Data(limit);
     var expected = recvStatus;
     //exercise
     var actual = sut.Append(new byte[size]);
     //verify
     Assert.That(actual, Is.EqualTo(expected));
 }
Ejemplo n.º 2
0
 public void Appendでドットのみの行を受信()
 {
     //setUp
     const int sizeLimit = 1000;
     var sut = new Data(sizeLimit);
     var expected = RecvStatus.Continue;
     //exercise
     var actual = sut.Append(Encoding.ASCII.GetBytes("1:1\r\n\r\n..\r\n"));//<CL><CR>..<CL><CR>
     //verify
     Assert.That(actual, Is.EqualTo(expected));
 }
Ejemplo n.º 3
0
 public void Appendでドットのみの行の確認()
 {
     //setUp
     const int sizeLimit = 1000;
     var sut = new Data(sizeLimit);
     var expected = ".\r\n";
     //exercise
     sut.Append(Encoding.ASCII.GetBytes("1:1\r\n\r\n..\r\n.\r\n"));//>.htaccess
     var lines = Inet.GetLines(sut.Mail.GetBody());
     var actual = Encoding.ASCII.GetString(lines[0]);
     //verify
     Assert.That(actual, Is.EqualTo(expected));
 }
Ejemplo n.º 4
0
 public void Appendでメール受信の完了時にFinishが返される()
 {
     //setUp
     const int sizeLimit = 1000;
     var sut = new Data(sizeLimit);
     var expected = RecvStatus.Finish;
     //exercise
     var actual = sut.Append(Encoding.ASCII.GetBytes("1:1\r\n\r\n.\r\n"));//<CL><CR>.<CL><CR>
     //verify
     Assert.That(actual,Is.EqualTo(expected));
 }
Ejemplo n.º 5
0
 public void Appendでメール受信中にContinueが返される()
 {
     //setUp
     const int sizeLimit = 1000;
     var sut = new Data(sizeLimit);
     var expected = RecvStatus.Continue;
     //exercise
     var actual = sut.Append(Encoding.ASCII.GetBytes("1:1\r\n\r\n."));
     //verify
     Assert.That(actual, Is.EqualTo(expected));
 }