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();
}
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();
}
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();
}
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();
}
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();
}