aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject [2/2] aries-rsa git commit: [ARIES-1623] Add test for inner class
Date Tue, 04 Oct 2016 17:04:31 GMT
[ARIES-1623] Add test for inner class


Project: http://git-wip-us.apache.org/repos/asf/aries-rsa/repo
Commit: http://git-wip-us.apache.org/repos/asf/aries-rsa/commit/b2e1d871
Tree: http://git-wip-us.apache.org/repos/asf/aries-rsa/tree/b2e1d871
Diff: http://git-wip-us.apache.org/repos/asf/aries-rsa/diff/b2e1d871

Branch: refs/heads/master
Commit: b2e1d8711123c7b481e51fd45fd364dc0f02a48f
Parents: e41310a
Author: Christian Schneider <chris@die-schneider.net>
Authored: Tue Oct 4 19:04:13 2016 +0200
Committer: Christian Schneider <chris@die-schneider.net>
Committed: Tue Oct 4 19:04:13 2016 +0200

----------------------------------------------------------------------
 .../importer/FilterHelperTest.java              | 45 ++++++++++++++++++++
 1 file changed, 45 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aries-rsa/blob/b2e1d871/topology-manager/src/test/java/org/apache/aries/rsa/topologymanager/importer/FilterHelperTest.java
----------------------------------------------------------------------
diff --git a/topology-manager/src/test/java/org/apache/aries/rsa/topologymanager/importer/FilterHelperTest.java
b/topology-manager/src/test/java/org/apache/aries/rsa/topologymanager/importer/FilterHelperTest.java
new file mode 100644
index 0000000..5644073
--- /dev/null
+++ b/topology-manager/src/test/java/org/apache/aries/rsa/topologymanager/importer/FilterHelperTest.java
@@ -0,0 +1,45 @@
+/**
+ * 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.aries.rsa.topologymanager.importer;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class FilterHelperTest {
+
+    @Test
+    public void testClass()  {
+        testWithClassName(FilterHelperTest.class.getName());
+    }
+    
+    @Test
+    public void testInnerClass()  {
+        testWithClassName(InnerClass.class.getName());
+    }
+
+    private void testWithClassName(String className) {
+        String filter = String.format("(objectClass=%s)", className);
+        String objClass = FilterHelper.getObjectClass(filter);
+        Assert.assertEquals(className, objClass);
+    }
+    
+    class InnerClass {
+    }
+
+}


Mime
View raw message