Search in sources :

Example 6 with Me

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

the class FireCloudServiceImplTest method testIsRequesterEnabledInFirecloud_all.

@Test
public void testIsRequesterEnabledInFirecloud_all() throws ApiException {
    Me me = new Me();
    Enabled enabled = new Enabled();
    enabled.setGoogle(true);
    enabled.setLdap(true);
    enabled.setAllUsersGroup(true);
    me.setEnabled(enabled);
    when(profileApi.me()).thenReturn(me);
    assertThat(service.isRequesterEnabledInFirecloud()).isTrue();
}
Also used : Me(org.pmiops.workbench.firecloud.model.Me) Enabled(org.pmiops.workbench.firecloud.model.Enabled) Test(org.junit.Test)

Example 7 with Me

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

the class FireCloudServiceImplTest method testIsRequesterEnabledInFirecloud_noGoogle.

@Test
public void testIsRequesterEnabledInFirecloud_noGoogle() throws ApiException {
    Me me = new Me();
    Enabled enabled = new Enabled();
    enabled.setLdap(true);
    enabled.setAllUsersGroup(true);
    me.setEnabled(enabled);
    when(profileApi.me()).thenReturn(me);
    assertThat(service.isRequesterEnabledInFirecloud()).isFalse();
}
Also used : Me(org.pmiops.workbench.firecloud.model.Me) Enabled(org.pmiops.workbench.firecloud.model.Enabled) Test(org.junit.Test)

Example 8 with Me

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

the class FireCloudServiceImplTest method testIsRequesterEnabledInFirecloud_noLdap.

@Test
public void testIsRequesterEnabledInFirecloud_noLdap() throws ApiException {
    Me me = new Me();
    Enabled enabled = new Enabled();
    enabled.setGoogle(true);
    enabled.setAllUsersGroup(true);
    me.setEnabled(enabled);
    when(profileApi.me()).thenReturn(me);
    assertThat(service.isRequesterEnabledInFirecloud()).isFalse();
}
Also used : Me(org.pmiops.workbench.firecloud.model.Me) Enabled(org.pmiops.workbench.firecloud.model.Enabled) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)8 Me (org.pmiops.workbench.firecloud.model.Me)8 Enabled (org.pmiops.workbench.firecloud.model.Enabled)5 Userinfoplus (com.google.api.services.oauth2.model.Userinfoplus)2 UserInfo (org.pmiops.workbench.firecloud.model.UserInfo)2