use of org.ligoj.app.resource.subscription.SubscriptionVo in project ligoj-api by ligoj.
the class ProjectResourceTest method findByIdWithSubscription.
/**
* test {@link ProjectResource#findById(int)}
*/
@Test
public void findByIdWithSubscription() throws IOException {
final Project byName = repository.findByName("gStack");
persistEntities("csv", new Class[] { Event.class }, StandardCharsets.UTF_8.name());
initSpringSecurityContext("alongchu");
final ProjectVo project = resource.findById(byName.getId());
// Check subscription
Assertions.assertTrue(project.getSubscriptions().size() >= 6);
for (final SubscriptionVo subscription : project.getSubscriptions()) {
if (subscription.getStatus() != null) {
return;
}
}
Assertions.fail("Subscriptions status was expected.");
}
Aggregations