You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2015/05/22 18:49:09 UTC

incubator-tinkerpop git commit: Add SerializerTest.

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master dd28f55dc -> 1d3257371


Add SerializerTest.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/1d325737
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/1d325737
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/1d325737

Branch: refs/heads/master
Commit: 1d32573713d3dd884c6c9e47364267432819f1d4
Parents: dd28f55
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri May 22 12:48:50 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri May 22 12:48:50 2015 -0400

----------------------------------------------------------------------
 .../tinkerpop/gremlin/util/SerializerTest.java  | 41 ++++++++++++++++++++
 1 file changed, 41 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1d325737/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/util/SerializerTest.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/util/SerializerTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/util/SerializerTest.java
new file mode 100644
index 0000000..0f40280
--- /dev/null
+++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/util/SerializerTest.java
@@ -0,0 +1,41 @@
+/*
+ * 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.tinkerpop.gremlin.util;
+
+import org.apache.tinkerpop.gremlin.TestHelper;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+/**
+ * @author Stephen Mallette (http://stephen.genoprime.com)
+ */
+public class SerializerTest {
+
+    @Test
+    public void shouldBeUtilityClass() throws Exception {
+        TestHelper.assertIsUtilityClass(Serializer.class);
+    }
+
+    @Test
+    public void shouldSerializeAndDeserialize() throws Exception {
+        final String toSerialize = "something to serialize";
+        assertEquals("something to serialize", Serializer.deserializeObject(Serializer.serializeObject(toSerialize)));
+    }
+}