Search in sources :

Example 1 with Enabled

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

the class FireCloudServiceImplTest method testIsRequesterEnabledInFirecloud_enabledNoFlags.

@Test
public void testIsRequesterEnabledInFirecloud_enabledNoFlags() throws ApiException {
    Me me = new Me();
    me.setEnabled(new 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 2 with Enabled

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

the class FireCloudServiceImplTest method testIsRequesterEnabledInFirecloud_noAllUsers.

@Test
public void testIsRequesterEnabledInFirecloud_noAllUsers() throws ApiException {
    Me me = new Me();
    Enabled enabled = new Enabled();
    enabled.setGoogle(true);
    enabled.setLdap(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 3 with Enabled

use of org.pmiops.workbench.firecloud.model.Enabled 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 4 with Enabled

use of org.pmiops.workbench.firecloud.model.Enabled 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 5 with Enabled

use of org.pmiops.workbench.firecloud.model.Enabled 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)5 Enabled (org.pmiops.workbench.firecloud.model.Enabled)5 Me (org.pmiops.workbench.firecloud.model.Me)5