[Groonga-commit] droonga/fluent-plugin-droonga at 608fb29 [catalog-schema] schema: Add tests for reader of Column

Back to archive index

Yoji Shidara null+****@clear*****
Tue Feb 18 16:04:50 JST 2014


Yoji Shidara	2014-02-18 16:04:50 +0900 (Tue, 18 Feb 2014)

  New Revision: 608fb29b3094034b32c1b95009112e8f0c405881
  https://github.com/droonga/fluent-plugin-droonga/commit/608fb29b3094034b32c1b95009112e8f0c405881

  Message:
    schema: Add tests for reader of Column

  Modified files:
    test/unit/catalog/test_schema.rb

  Modified: test/unit/catalog/test_schema.rb (+28 -0)
===================================================================
--- test/unit/catalog/test_schema.rb    2014-02-18 15:52:24 +0900 (6f49492)
+++ test/unit/catalog/test_schema.rb    2014-02-18 16:04:50 +0900 (3d99d62)
@@ -123,5 +123,33 @@ class CatalogSchemaTest < Test::Unit::TestCase
                                   }).normalizer)
       end
     end
+
+    class ColumnTest < self
+      def create_column(name, data)
+        Droonga::Catalog::Schema::Column.new(name, data)
+      end
+
+      def test_name
+        assert_equal("column_name",
+                     create_column("column_name",
+                                   {}).name)
+      end
+
+      def test_type
+        assert_equal("Scalar",
+                     create_column("column_name",
+                                   {
+                                     "type" => "Scalar"
+                                   }).type)
+      end
+
+      def test_value_type
+        assert_equal("ShortText",
+                     create_column("column_name",
+                                   {
+                                     "valueType" => "ShortText"
+                                   }).value_type)
+      end
+    end
   end
 end
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index