Package pygmy.nntp

Examples of pygmy.nntp.NntpResponse


        buffer.append("ihave <blkdu9$pd8$1@hood.uits.indiana.edu>");
        buffer.append(Http.CRLF);

        NntpRequest request = new NntpRequest( null, new Properties(), new ByteArrayInputStream( buffer.toString().getBytes() ) );
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        NntpResponse response = new NntpResponse( baos );
        forum.createNewsgroup("comp.lang.java.programmer");

        request.nextCommand();
        NewsHandler handler = new NewsHandler( forum );
        assertTrue( "Assert that the handler handled the request.", handler.handleNntp( request, response ) );
View Full Code Here


        buffer.append(Http.CRLF);
        buffer.append("group foo.bar.baz");
        buffer.append(Http.CRLF);
        NntpRequest request = new NntpRequest( null, new Properties(), new ByteArrayInputStream( buffer.toString().getBytes() ) );
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        NntpResponse response = new NntpResponse( baos );

        request.nextCommand();
        GroupHandler handler = new GroupHandler( forum );
        assertTrue( "Assert that the handler handled the request.", handler.handleNntp( request, response ) );
        assertTrue( baos.toString().indexOf("215 list of newsgroups follows" + Http.CRLF + ".") >= 0 );
View Full Code Here

TOP

Related Classes of pygmy.nntp.NntpResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.