[gxml] GomHashMap: Added more test cases



commit 8caf6b7ab302a3870384c90c3a97c345ee080f3e
Author: Daniel Espinosa <esodan gmail com>
Date:   Mon Nov 7 22:21:02 2016 -0600

    GomHashMap: Added more test cases

 test/GomSerializationTest.vala |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/test/GomSerializationTest.vala b/test/GomSerializationTest.vala
index 8bc1fa3..3de5286 100644
--- a/test/GomSerializationTest.vala
+++ b/test/GomSerializationTest.vala
@@ -459,6 +459,16 @@ class GomSerializationTest : GXmlTest  {
       assert ((bs.books.get_item (0) as Book).name == "Title1");
       assert ((bs.books.get_item (1) as Book).name == "Title2");
       assert ((bs.books.get_item (2) as Book).name == "Title3");
+      assert (bs.books.get ("Title1") != null);
+      assert (bs.books.get ("Title1") is DomElement);
+      assert (bs.books.get ("Title1") is Book);
+      assert (bs.books.get ("Title2") != null);
+      assert (bs.books.get ("Title2") is DomElement);
+      assert (bs.books.get ("Title2") is Book);
+      assert (bs.books.get ("Title3") != null);
+      assert (bs.books.get ("Title3") is DomElement);
+      assert (bs.books.get ("Title3") is Book);
+      assert (bs.books.get ("Title4") == null);
     });
   }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]