Package org.apache.hadoop.test

Examples of org.apache.hadoop.test.Console


  @Test
  public void testXmlGatewayDescriptorStoreFailure() throws IOException {
    GatewayDescriptor descriptor = GatewayDescriptorFactory.create()
        .addResource().addFilter().param().up().up().up();

    Console console = new Console();
    try {
      console.capture();
      GatewayDescriptorFactory.store( descriptor, "xml", new BrokenWriter() );
      fail( "Expected IOException" );
    } catch( IOException e ) {
      assertThat( e.getMessage(), containsString( "BROKEN" ) );
    } finally {
      console.release();
    }

  }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.test.Console

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.