Passed the unit test

Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/90cfca05
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/90cfca05
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/90cfca05

Branch: refs/heads/master
Commit: 90cfca05012a9a9afdc856c4269bc693f851f246
Parents: e4f20c7
Author: Alex Huang <alex.hu...@citrix.com>
Authored: Tue Aug 6 09:35:08 2013 -0700
Committer: Alex Huang <alex.hu...@citrix.com>
Committed: Wed Aug 7 16:41:03 2013 -0700

----------------------------------------------------------------------
 .../cloudstack/framework/config/ConfigurationVO.java    |  2 ++
 .../framework/config/ConfigDepotAdminTest.java          | 12 ++++++------
 2 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/90cfca05/framework/config/src/org/apache/cloudstack/framework/config/ConfigurationVO.java
----------------------------------------------------------------------
diff --git 
a/framework/config/src/org/apache/cloudstack/framework/config/ConfigurationVO.java
 
b/framework/config/src/org/apache/cloudstack/framework/config/ConfigurationVO.java
index ba33df2..a21ccbc 100644
--- 
a/framework/config/src/org/apache/cloudstack/framework/config/ConfigurationVO.java
+++ 
b/framework/config/src/org/apache/cloudstack/framework/config/ConfigurationVO.java
@@ -79,6 +79,8 @@ public class ConfigurationVO implements Configuration {
     public ConfigurationVO(String component, ConfigKey<?> key) {
         this(key.category(), "DEFAULT", component, key.key(), 
key.defaultValue(), key.description());
         defaultValue = key.defaultValue();
+        dynamic = key.isDynamic();
+        scope = key.scope();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/90cfca05/framework/config/test/org/apache/cloudstack/framework/config/ConfigDepotAdminTest.java
----------------------------------------------------------------------
diff --git 
a/framework/config/test/org/apache/cloudstack/framework/config/ConfigDepotAdminTest.java
 
b/framework/config/test/org/apache/cloudstack/framework/config/ConfigDepotAdminTest.java
index 2a3add8..782b3c7 100644
--- 
a/framework/config/test/org/apache/cloudstack/framework/config/ConfigDepotAdminTest.java
+++ 
b/framework/config/test/org/apache/cloudstack/framework/config/ConfigDepotAdminTest.java
@@ -17,6 +17,7 @@
 package org.apache.cloudstack.framework.config;
 
 import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.times;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -28,7 +29,6 @@ import javax.inject.Inject;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Mockito;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.ComponentScan.Filter;
@@ -94,12 +94,12 @@ public class ConfigDepotAdminTest {
         _depotAdmin.populateConfigurations();
 
         // This is once because DynamicIntCK is returned.
-        verify(_configDao, 
times(1)).persist(Mockito.any(ConfigurationVO.class));
+        verify(_configDao, times(1)).persist(any(ConfigurationVO.class));
 
         when(_configDao.findById(DynamicIntCK.key())).thenReturn(dynamicIntCV);
         _depotAdmin.populateConfigurations();
         // This is two because DynamicIntCK also returns null.
-        verify(_configDao, 
times(2)).persist(Mockito.any(ConfigurationVO.class));
+        verify(_configDao, times(2)).persist(any(ConfigurationVO.class));
     }
     
     @Configuration
@@ -107,17 +107,17 @@ public class ConfigDepotAdminTest {
     static class TestConfiguration extends 
SpringUtils.CloudStackTestConfiguration {
         @Bean
         public Configurable configurable() {
-            return Mockito.mock(Configurable.class);
+            return mock(Configurable.class);
         }
 
         @Bean
         public EntityManager entityMgr() {
-            return Mockito.mock(EntityManager.class);
+            return mock(EntityManager.class);
         }
 
         @Bean
         public ConfigurationDao configurationDao() {
-            return Mockito.mock(ConfigurationDao.class);
+            return mock(ConfigurationDao.class);
         }
 
         public static class Library implements TypeFilter {

Reply via email to