Thx , great idea. Will do it soon and commit the patch. bye
Am Mittwoch, den 29.03.2006, 13:36 +0200 schrieb Stefano Bagnara:
> Norman Maurer wrote:
> > Just start to write a junit test for this,, Now i notice a problem ..
> > The method helo(InetAddress) in SMTPProtocol needs a InetAddress but i
> > need to test it with not resolvable domains. So if i do a
> > InetAddress.getHostbyName("egjoerg.de"); an exception is thrown before
> > pass this to the HeloCmdHandler..
> >
> > So i need to create an own witch extends the one which is used now.. Or
> > there are any other solutions ?
>
> I think you can provide your own extension of SMTPProtocol and you can
> promote to public the "protected void sendCommand(java.lang.String
> command, java.lang.String[] parameters) " method and use the sendCommand
> to send the "bad" helo.
>
> class MySMTPProtocol extends SMTPProtocol {
>
> // TODO: duplicate the constructor
>
> public void sendCommand(java.lang.String command,
> java.lang.String[]
> parameters) {
> super.sendCommand(command,parameters);
> }
>
> }
>
> Then replace
>
> SMTPProtocol smtpProtocol = new SMTPProtocol("127.0.0.1",
> m_smtpListenerPort);
>
> with:
>
> MySMTPProtocol smtpProtocol = new MySMTPProtocol("127.0.0.1",
> m_smtpListenerPort);
>
> Stefano
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> !EXCUBATOR:1,442a7218200621689820358!
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
