Package samples.constructor

Examples of samples.constructor.PrivateConstructorInstantiationDemo


public class PrivateConstructorInstantiationDemoTest {

  @Test
  public void testGetState_noArgConstructor() throws Exception {
    final int expected = 42;
    PrivateConstructorInstantiationDemo tested = invokeConstructor(PrivateConstructorInstantiationDemo.class);
    int actual = tested.getState();

    assertEquals("Expected and actual did not match.", expected, actual);
  }
View Full Code Here


  }

  @Test
  public void testGetState_intConstructor() throws Exception {
    final int expected = 12;
    PrivateConstructorInstantiationDemo tested = invokeConstructor(
        PrivateConstructorInstantiationDemo.class, expected);
    int actual = tested.getState();

    assertEquals("Expected and actual did not match.", expected, actual);
  }
View Full Code Here

TOP

Related Classes of samples.constructor.PrivateConstructorInstantiationDemo

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.