Package org.apache.cloudstack.region.dao

Examples of org.apache.cloudstack.region.dao.RegionDao


    }
   
    @Test
    public void testUniqueName() {
      RegionManagerImpl regionMgr = new RegionManagerImpl();
      RegionDao regionDao = Mockito.mock(RegionDao.class);
      RegionVO region = new RegionVO(2, "APAC", "");
      Mockito.when(regionDao.findByName(Mockito.anyString())).thenReturn(region);     
      regionMgr._regionDao = regionDao;
      try {
        regionMgr.addRegion(2, "APAC", "");
      } catch (InvalidParameterValueException e){
        Assert.assertEquals("Region with name: APAC already exists", e.getMessage());
View Full Code Here


public class RegionManagerTest {

    @Test
    public void testUniqueName() {
        RegionManagerImpl regionMgr = new RegionManagerImpl();
        RegionDao regionDao = Mockito.mock(RegionDao.class);
        RegionVO region = new RegionVO(2, "APAC", "");
        Mockito.when(regionDao.findByName(Matchers.anyString())).thenReturn(region);
        regionMgr._regionDao = regionDao;
        try {
            regionMgr.addRegion(2, "APAC", "");
        } catch (InvalidParameterValueException e) {
            Assert.assertEquals("Region with name: APAC already exists", e.getMessage());
View Full Code Here

public class RegionManagerTest {

    @Test
    public void testUniqueName() {
      RegionManagerImpl regionMgr = new RegionManagerImpl();
      RegionDao regionDao = Mockito.mock(RegionDao.class);
      RegionVO region = new RegionVO(2, "APAC", "");
      Mockito.when(regionDao.findByName(Mockito.anyString())).thenReturn(region);     
      regionMgr._regionDao = regionDao;
      try {
        regionMgr.addRegion(2, "APAC", "");
      } catch (InvalidParameterValueException e){
        Assert.assertEquals("Region with name: APAC already exists", e.getMessage());
View Full Code Here

TOP

Related Classes of org.apache.cloudstack.region.dao.RegionDao

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.