Commit b5b6b43f authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

[2906] Update/add some assertions in tests

parent 4f3776c2
......@@ -62,7 +62,7 @@ protected:
TEST_F(ZoneTableAccessorTest, iteratorFromCache) {
// Confirm basic iterator behavior.
ZoneTableAccessor::IteratorPtr it = accessor_.getIterator();
EXPECT_TRUE(it);
ASSERT_TRUE(it);
EXPECT_FALSE(it->isLast());
EXPECT_EQ(0, it->getCurrent().index); // index is always 0 for this version
EXPECT_EQ(Name("example.com"), it->getCurrent().origin);
......@@ -87,6 +87,7 @@ TEST_F(ZoneTableAccessorTest, emptyTable) {
"{\"cache-enable\": true, \"params\": {}}"), true);
ZoneTableAccessorCache accessor(empty_config);
ZoneTableAccessor::IteratorPtr it = accessor.getIterator();
ASSERT_TRUE(it);
EXPECT_TRUE(it->isLast());
EXPECT_THROW(it->getCurrent(), isc::InvalidOperation);
EXPECT_THROW(it->next(), isc::InvalidOperation);
......@@ -102,6 +103,7 @@ TEST_F(ZoneTableAccessorTest, disabledTable) {
" \"cache-zones\": [\"example.com\", \"example.org\"]}"), true);
ZoneTableAccessorCache accessor(mock_config);
ZoneTableAccessor::IteratorPtr it = accessor.getIterator();
ASSERT_TRUE(it);
EXPECT_TRUE(it->isLast());
EXPECT_THROW(it->getCurrent(), isc::InvalidOperation);
EXPECT_THROW(it->next(), isc::InvalidOperation);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment