[svn] commit: r3919 - /branches/trac441/src/lib/datasrc/tests/memory_datasrc_unittest.cc
BIND 10 source code commits
bind10-changes at lists.isc.org
Tue Dec 21 09:28:33 UTC 2010
Author: vorner
Date: Tue Dec 21 09:28:33 2010
New Revision: 3919
Log:
Test for constructor of MemoryZone
Modified:
branches/trac441/src/lib/datasrc/tests/memory_datasrc_unittest.cc
Modified: branches/trac441/src/lib/datasrc/tests/memory_datasrc_unittest.cc
==============================================================================
--- branches/trac441/src/lib/datasrc/tests/memory_datasrc_unittest.cc (original)
+++ branches/trac441/src/lib/datasrc/tests/memory_datasrc_unittest.cc Tue Dec 21 09:28:33 2010
@@ -111,4 +111,31 @@
EXPECT_EQ(Name("i.g.h"),
memory_datasrc.findZone(Name("z.i.g.h")).zone->getOrigin());
}
+
+/// \brief Test fixture for the MemoryZone class
+class MemoryZoneTest : public ::testing::Test {
+public:
+ MemoryZoneTest() :
+ class_(RRClass::IN()),
+ origin_("example.org"),
+ zone_(class_, origin_)
+ { }
+ // Some data to test with
+ RRClass class_;
+ Name origin_;
+ // The zone to torture by tests
+ MemoryZone zone_;
+};
+
+/**
+ * \brief Test MemoryZone::MemoryZone constructor.
+ *
+ * Takes the created zone and checks its properties they are the same
+ * as passed parameters.
+ */
+TEST_F(MemoryZoneTest, Constructor) {
+ ASSERT_EQ(class_, zone_.getClass());
+ ASSERT_EQ(origin_, zone_.getOrigin());
}
+
+}
More information about the bind10-changes
mailing list