package org.subethamail.smtp.test;



/**
 * @author Jeff Schnitzer
 */
public class HelloTest extends ServerTestCase
{
	public HelloTest(String name)
	{
		super(name);
	}
	
	public void testHelloCommand() throws Exception
	{
		expect("220");

		send("HELO");
		expect("501 Syntax: HELO <hostname>");

		send("QUIT");

		// Bad syntax
//		c.send("HELO");
//		c.expect("501 Syntax: HELO <hostname>");
		
		// Correct!
//		c.send("HELO foo.com");
//		c.expect("250 127.0.0.1");

		// Correct!
//		c.send("HELO foo.com");
//		c.expect("250 127.0.0.1");
	}

//	public void testHelloReset() throws Exception
//	{
//		Client c = new Client("localhost", PORT);
//		
//		c.send("HELO foo.com");
//		c.expect("250 127.0.0.1");
//
//		c.send("MAIL FROM: test@foo.com");
//		c.expect("250 Ok");
//
//		c.send("RSET");
//		c.expect("250 Ok");
//
//		c.send("MAIL FROM: test@foo.com");
//		c.expect("250 Ok");
//	}
}

@@ -299,43 +299,8 @@
 );%0A%0A
-%09%09send(%22QUIT%22);%0A%0A%09%09// Bad syntax%0A//
 %09%09c.
@@ -309,26 +309,24 @@
 nd(%22HELO%22);%0A
-//
 %09%09c.expect(%22
@@ -365,34 +365,32 @@
 %09%0A%09%09// Correct!%0A
-//
 %09%09c.send(%22HELO f
@@ -391,34 +391,32 @@
 HELO foo.com%22);%0A
-//
 %09%09c.expect(%22250 
@@ -443,18 +443,16 @@
 orrect!%0A
-//
 %09%09c.send
@@ -461,34 +461,32 @@
 HELO foo.com%22);%0A
-//
 %09%09c.expect(%22250 
@@ -502,18 +502,16 @@
 %22);%0A%09%7D%0A%0A
-//
 %09public 
@@ -553,66 +553,11 @@
 ion%0A
-//
 %09%7B%0A
-//%09%09Client c = new Client(%22localhost%22, PORT);%0A//%09%09%0A//
 %09%09c.
@@ -570,34 +570,32 @@
 HELO foo.com%22);%0A
-//
 %09%09c.expect(%22250 
@@ -603,29 +603,25 @@
 27.0.0.1%22);%0A
-//%0A//
+%0A
 %09%09c.send(%22MA
@@ -637,34 +637,32 @@
 test@foo.com%22);%0A
-//
 %09%09c.expect(%22250 
@@ -659,37 +659,33 @@
 pect(%22250 Ok%22);%0A
-//%0A//
+%0A
 %09%09c.send(%22RSET%22)
@@ -682,26 +682,24 @@
 nd(%22RSET%22);%0A
-//
 %09%09c.expect(%22
@@ -712,13 +712,9 @@
 %22);%0A
-//%0A//
+%0A
 %09%09c.
@@ -746,18 +746,16 @@
 .com%22);%0A
-//
 %09%09c.expe
@@ -768,15 +768,13 @@
 0 Ok%22);%0A
-//
 %09%7D%0A%7D%0A

enable some tests.