File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
server/src/test/java/com/cloud/user Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 4545import org .apache .cloudstack .resourcedetail .UserDetailVO ;
4646import org .apache .cloudstack .webhook .WebhookHelper ;
4747import org .junit .Assert ;
48- import org .junit .BeforeClass ;
4948import org .junit .Before ;
5049import org .junit .Test ;
5150import org .mockito .ArgumentCaptor ;
5453import org .mockito .MockedStatic ;
5554import org .mockito .Mockito ;
5655import org .springframework .beans .factory .NoSuchBeanDefinitionException ;
57- import org .junit .After ;
5856
5957import com .cloud .acl .DomainChecker ;
6058import com .cloud .api .auth .SetupUserTwoFactorAuthenticationCmd ;
7573import com .cloud .vm .UserVmVO ;
7674import com .cloud .vm .VMInstanceVO ;
7775import com .cloud .vm .snapshot .VMSnapshotVO ;
76+ import com .cloud .projects .ProjectVO ;
7877
7978public class AccountManagerImplTest extends AccountManagentImplTestBase {
8079
@@ -1390,6 +1389,9 @@ public void checkIfAccountManagesProjectsTestThrowExceptionWhenTheAccountIsAProj
13901389 List <Long > managedProjectIds = List .of (1L );
13911390
13921391 Mockito .when (_projectAccountDao .listAdministratedProjectIds (accountId )).thenReturn (managedProjectIds );
1392+ ProjectVO project = Mockito .mock (ProjectVO .class );
1393+ Mockito .when (project .getRemoved ()).thenReturn (null );
1394+ Mockito .when (_projectDao .findById (1L )).thenReturn (project );
13931395 accountManagerImpl .checkIfAccountManagesProjects (accountId );
13941396 }
13951397
You can’t perform that action at this time.
0 commit comments