コード例 #1
0
  /** Test que l'inject dependencies renvoit bien l'object envoyé. si celui-ci est déjé advised */
  public void testInjectDependenciesWithAnAdvised() {

    Project basicProject1 = CoreObjectFactory.getProject();

    Project basicProject2 = basicProjectProxyUtil.injectDependencies(basicProject1);

    assertSame(basicProject1, basicProject2);
  }
コード例 #2
0
  /** Test que l'inject dependencies renvoit bien un proxy quand on lui passe un object */
  public void testInjectDependenciesWithoutAnAdvised() {

    Project basicProject = new ProjectImpl();

    Project basicProjectProxyReturned = basicProjectProxyUtil.injectDependencies(basicProject);

    assertTrue(basicProjectProxyReturned instanceof Advised);
  }