示例#1
0
 @Test
 public void clusterWithNoCpu() {
   createCommandWithNoCpuName();
   when(clusterDao.get(any(Guid.class))).thenReturn(createClusterWithNoCpuName());
   when(clusterDao.getByName(anyString())).thenReturn(createClusterWithNoCpuName());
   when(glusterVolumeDao.getByClusterId(any(Guid.class))).thenReturn(new ArrayList<>());
   allQueriesForVms();
   assertTrue(cmd.validate());
 }
示例#2
0
 private void clusterHasGlusterVolumes() {
   List<GlusterVolumeEntity> volumes = new ArrayList<>();
   volumes.add(new GlusterVolumeEntity());
   when(glusterVolumeDao.getByClusterId(any(Guid.class))).thenReturn(volumes);
 }