You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ma...@apache.org on 2012/10/24 08:05:33 UTC

svn commit: r1401562 [2/2] - in /incubator/ambari/branches/AMBARI-666: ./ ambari-server/src/main/java/org/apache/ambari/server/api/handlers/ ambari-server/src/main/java/org/apache/ambari/server/api/query/ ambari-server/src/main/java/org/apache/ambari/s...

Added: incubator/ambari/branches/AMBARI-666/ambari-server/src/test/java/org/apache/ambari/server/api/services/serializers/JsonSerializerTest.java
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-server/src/test/java/org/apache/ambari/server/api/services/serializers/JsonSerializerTest.java?rev=1401562&view=auto
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-server/src/test/java/org/apache/ambari/server/api/services/serializers/JsonSerializerTest.java (added)
+++ incubator/ambari/branches/AMBARI-666/ambari-server/src/test/java/org/apache/ambari/server/api/services/serializers/JsonSerializerTest.java Wed Oct 24 06:05:32 2012
@@ -0,0 +1,43 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.server.api.services.serializers;
+
+import org.apache.ambari.server.api.services.Result;
+import org.junit.Test;
+
+import javax.ws.rs.core.UriInfo;
+
+import static org.easymock.EasyMock.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * JSONSerializer unit tests
+ */
+public class JsonSerializerTest {
+  //todo: unit test serializer
+//  @Test
+//  public void testSerialize() throws Exception {
+//    Result result = createMock(Result.class);
+//    UriInfo uriInfo = createMock(UriInfo.class);
+//
+//
+//  }
+}

Modified: incubator/ambari/branches/AMBARI-666/ambari-server/src/test/java/org/apache/ambari/server/controller/jmx/TestStreamProvider.java
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-server/src/test/java/org/apache/ambari/server/controller/jmx/TestStreamProvider.java?rev=1401562&r1=1401561&r2=1401562&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-server/src/test/java/org/apache/ambari/server/controller/jmx/TestStreamProvider.java (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-server/src/test/java/org/apache/ambari/server/controller/jmx/TestStreamProvider.java Wed Oct 24 06:05:32 2012
@@ -34,6 +34,7 @@ public class TestStreamProvider implemen
     FILE_MAPPING.put("50075", "hdfs_datanode_jmx.json");
     FILE_MAPPING.put("50030", "mapreduce_jobtracker_jmx.json");
     FILE_MAPPING.put("50060", "mapreduce_tasktracker_jmx.json");
+    FILE_MAPPING.put("60010", "hdfs_namenode_jmx.json");
   }
 
   private String lastSpec;

Modified: incubator/ambari/branches/AMBARI-666/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/ResourceImpl.java
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/AMBARI-666/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/ResourceImpl.java?rev=1401562&r1=1401561&r2=1401562&view=diff
==============================================================================
--- incubator/ambari/branches/AMBARI-666/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/ResourceImpl.java (original)
+++ incubator/ambari/branches/AMBARI-666/ambari-server/src/test/java/org/apache/ambari/server/controller/predicate/ResourceImpl.java Wed Oct 24 06:05:32 2012
@@ -18,6 +18,7 @@
 
 package org.apache.ambari.server.controller.predicate;
 
+import org.apache.ambari.server.api.util.TreeNode;
 import org.apache.ambari.server.controller.spi.PropertyId;
 import org.apache.ambari.server.controller.spi.Resource;
 
@@ -60,11 +61,16 @@ public class ResourceImpl implements Res
   }
 
   @Override
-  public Map<String, Map<String, Object>> getCategories() {
+  public Map<String, Map<String, Object>> getPropertiesMap() {
     return categories;
   }
 
   @Override
+  public TreeNode<Map<String, Object>> getProperties() {
+    return null;
+  }
+
+  @Override
   public void setProperty(PropertyId id, Object value) {
     String category = id.getCategory();