Package samples.suppressconstructor

Examples of samples.suppressconstructor.SuppressNonParentConstructorDemo


public class SuppressNonParentConstructorDemoTest {

  @Test
  public void testNewInstanceWithoutInvokingConstructor() throws Exception {
    SuppressNonParentConstructorDemo constructorDemo = Whitebox
        .newInstance(SuppressNonParentConstructorDemo.class);
    assertEquals("Hello", constructorDemo.getHello());
  }
View Full Code Here


    assertEquals("Hello", constructorDemo.getHello());
  }

  @Test(expected = IllegalStateException.class)
  public void testNewInstanceInvokingConstructor() throws Exception {
    new SuppressNonParentConstructorDemo("failing");
  }
View Full Code Here

TOP

Related Classes of samples.suppressconstructor.SuppressNonParentConstructorDemo

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.