Browse Source

[2108] Check that getSOA() on the iterator throws

Mukund Sivaraman 12 years ago
parent
commit
64b3b91a26
1 changed files with 8 additions and 0 deletions
  1. 8 0
      src/lib/datasrc/memory/tests/memory_client_unittest.cc

+ 8 - 0
src/lib/datasrc/memory/tests/memory_client_unittest.cc

@@ -98,6 +98,14 @@ TEST_F(MemoryClientTest, getIterator) {
     EXPECT_EQ(ConstRRsetPtr(), iterator->getNextRRset());
 }
 
+TEST_F(MemoryClientTest, getIteratorGetSOAThrowsNotImplemented) {
+    client_->load(Name("example.org"), TEST_DATA_DIR "/example.org-empty.zone");
+    ZoneIteratorPtr iterator(client_->getIterator(Name("example.org")));
+
+    // This method is not implemented.
+    EXPECT_THROW(iterator->getSOA(), isc::NotImplemented);
+}
+
 TEST_F(MemoryClientTest, getUpdaterThrowsNotImplemented) {
     // This method is not implemented.
     EXPECT_THROW(client_->getUpdater(Name("."), false, false),