Search in sources :

Example 1 with BillingProjectMembership

use of org.pmiops.workbench.model.BillingProjectMembership in project workbench by all-of-us.

the class ProfileControllerTest method testGetBillingProjects_notEmpty.

@Test
public void testGetBillingProjects_notEmpty() throws Exception {
    org.pmiops.workbench.firecloud.model.BillingProjectMembership membership = new org.pmiops.workbench.firecloud.model.BillingProjectMembership();
    membership.setProjectName("a");
    membership.setRole("c");
    membership.setCreationStatus(CreationStatusEnum.CREATING);
    when(fireCloudService.getBillingProjectMemberships()).thenReturn(ImmutableList.of(membership));
    List<BillingProjectMembership> memberships = profileController.getBillingProjects().getBody();
    assertThat(memberships.size()).isEqualTo(1);
    BillingProjectMembership result = memberships.get(0);
    assertThat(result.getProjectName()).isEqualTo("a");
    assertThat(result.getRole()).isEqualTo("c");
    assertThat(result.getStatus()).isEqualTo(BillingProjectStatus.PENDING);
}
Also used : BillingProjectMembership(org.pmiops.workbench.model.BillingProjectMembership) DataJpaTest(org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 BillingProjectMembership (org.pmiops.workbench.model.BillingProjectMembership)1 DataJpaTest (org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest)1