JUnit: How to access rootAM from within nestedAM?

In normal model project, the way to access root AM from within nested AM is simple -

RootAMImpl rootAM =  (RootAMImpl)this.getRootApplicationModule();

However, the same approach doesn't help in JUnit model project. Use the following approach - 

Inside setUp() method --  RootAM rootAM =  (RootAM)Configuration.createRootApplicationModule(ROOT_AM, ROOT_AM_CONFIG);

Inside tearDown() method -- Configuration.releaseRootApplicationModule(rootAM , true);


Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

ADF Tips and Tricks

Search

Categories
Archives
« July 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
  
       
Today