Re: [appfuse-user] how can cobertura coverage work?

2010-12-13 Thread tibi


can be because the if else's are not hit with both options or the  
method is hitting a parent class.



tibi




? 2010-12-13 19:50, Josep García ??:

I have found this post, which assures solves the problem.
http://www.mail-archive.com/[email protected]/msg08809.html

Let us know if it works for you too!
Josep

2010/12/13 mailto:[email protected]>>

   it had something to do with turning off the
   aspectj-maven-plugin

   i see i have this one commented out


   tibi


   hi,Matt
   "mvn appfuse:full-source",the default appfuse codes will be added
   including a couple of unit test code,but the cobertura
   coverage is still
   0%,i search many threads,but there aren't the formal manual in
   www.appfuse.org ,may be the
   aspectj-maven-plugin affect the cobertura,so
   it may depend on the APF-1217 resolved

   -
   To unsubscribe, e-mail: [email protected]
   
   For additional commands, e-mail:
   [email protected]
   






   -
   To unsubscribe, e-mail: [email protected]
   
   For additional commands, e-mail: [email protected]
   



Great,I can run the cobertura successful,but i am still puzzled about
the result:

public class UserManagerImplTest extends BaseManagerMockTestCase {
//~ Instance fields

private UserManagerImpl userManager = new UserManagerImpl();
private RoleManagerImpl roleManager;
private UserDao userDao;
private RoleDao roleDao;

//~ Methods

@Before
public void setUp() throws Exception {
userDao = context.mock(UserDao.class);
userManager.setUserDao(userDao);
roleDao = context.mock(RoleDao.class);
roleManager = new RoleManagerImpl(roleDao);
}

@Test
public void testGetUser() throws Exception {
final User testData = new User("1");
testData.getRoles().add(new Role("user"));

// set expected behavior on dao
context.checking(new Expectations() {{
one(userDao).get(with(equal(1L)));
will(returnValue(testData));
}});

User user = userManager.getUser("1");
assertTrue(user != null);
assert user != null;
assertTrue(user.getRoles().size() == 1);
}



preceding code UserManagerImplTest is coming from "mvn appfuse:full-source"
we can see method   userManager.getUser("1")
but the coverage report still show 0% at the UserManager,why?





-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [appfuse-user] how can cobertura coverage work?

2010-12-13 Thread dan

? 2010-12-13 19:50, Josep García ??:

I have found this post, which assures solves the problem.
http://www.mail-archive.com/[email protected]/msg08809.html

Let us know if it works for you too!
Josep

2010/12/13 mailto:[email protected]>>

it had something to do with turning off the
aspectj-maven-plugin

i see i have this one commented out


tibi


hi,Matt
"mvn appfuse:full-source",the default appfuse codes will be added
including a couple of unit test code,but the cobertura
coverage is still
0%,i search many threads,but there aren't the formal manual in
www.appfuse.org ,may be the
aspectj-maven-plugin affect the cobertura,so
it may depend on the APF-1217 resolved

-
To unsubscribe, e-mail: [email protected]

For additional commands, e-mail:
[email protected]







-
To unsubscribe, e-mail: [email protected]

For additional commands, e-mail: [email protected]



Great,I can run the cobertura successful,but i am still puzzled about 
the result:


public class UserManagerImplTest extends BaseManagerMockTestCase {
//~ Instance fields 


private UserManagerImpl userManager = new UserManagerImpl();
private RoleManagerImpl roleManager;
private UserDao userDao;
private RoleDao roleDao;

//~ Methods 


@Before
public void setUp() throws Exception {
userDao = context.mock(UserDao.class);
userManager.setUserDao(userDao);
roleDao = context.mock(RoleDao.class);
roleManager = new RoleManagerImpl(roleDao);
}

@Test
public void testGetUser() throws Exception {
final User testData = new User("1");
testData.getRoles().add(new Role("user"));

// set expected behavior on dao
context.checking(new Expectations() {{
one(userDao).get(with(equal(1L)));
will(returnValue(testData));
}});

User user = userManager.getUser("1");
assertTrue(user != null);
assert user != null;
assertTrue(user.getRoles().size() == 1);
}



preceding code UserManagerImplTest is coming from "mvn appfuse:full-source"
we can see method   userManager.getUser("1")
but the coverage report still show 0% at the UserManager,why?



Re: [appfuse-user] how can cobertura coverage work?

2010-12-13 Thread Josep García
I have found this post, which assures solves the problem.
http://www.mail-archive.com/[email protected]/msg08809.html

Let us know if it works for you too!
Josep

2010/12/13 

> it had something to do with turning off the
> aspectj-maven-plugin
>
> i see i have this one commented out
>
>
> tibi
>
>
>  hi,Matt
>> "mvn appfuse:full-source",the default appfuse codes will be added
>> including a couple of unit test code,but the cobertura coverage is still
>> 0%,i search many threads,but there aren't the formal manual in
>> www.appfuse.org,may be the aspectj-maven-plugin affect the cobertura,so
>> it may depend on the APF-1217 resolved
>>
>> -
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>>
>
>
>
> -
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


Re: [appfuse-user] how can cobertura coverage work?

2010-12-13 Thread tibi

it had something to do with turning off the
aspectj-maven-plugin

i see i have this one commented out


tibi


hi,Matt
"mvn appfuse:full-source",the default appfuse codes will be added
including a couple of unit test code,but the cobertura coverage is still
0%,i search many threads,but there aren't the formal manual in
www.appfuse.org,may be the aspectj-maven-plugin affect the cobertura,so
it may depend on the APF-1217 resolved

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]







-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [appfuse-user] how can cobertura coverage work?

2010-12-13 Thread tibi


i have wrote some posts in this mailing list about this. can you  
google for it.


hopefully the answer is there...

tibi

Quoting dan :


hi,Matt
"mvn appfuse:full-source",the default appfuse codes will be added
including a couple of unit test code,but the cobertura coverage is still
0%,i search many threads,but there aren't the formal manual in
www.appfuse.org,may be the aspectj-maven-plugin affect the cobertura,so
it may depend on the APF-1217 resolved

-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]







-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]