diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2014-12-09 23:35:00 +0100 |
---|---|---|
committer | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2014-12-09 23:35:00 +0100 |
commit | 325d78169620094178513303d65c71d933182ae4 (patch) | |
tree | e75886e9d4a89ddbc169aad094513ec447f0a499 /test | |
parent | c379a9e5f031dfafa0dc0e132061610b706a7b28 (diff) |
Added a ResourceLocator stream test.
Diffstat (limited to 'test')
-rw-r--r-- | test/core/ResourceLocatorTest.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/core/ResourceLocatorTest.cpp b/test/core/ResourceLocatorTest.cpp index a3860c5..38cfc3e 100644 --- a/test/core/ResourceLocatorTest.cpp +++ b/test/core/ResourceLocatorTest.cpp @@ -53,4 +53,17 @@ TEST(ResourceLocator, locate) ASSERT_EQ(ResourceLocator::Type::DOMAIN, location.type); ASSERT_EQ("path", location.location); } + +TEST(ResourceLocator, stream) +{ + TestResourceLocator instance; + ResourceLocator::Location location = + instance.locate("path", "", ResourceLocator::Type::DOMAIN); + std::unique_ptr<std::istream> is = location.stream(); + + std::string str; + *is >> str; + + ASSERT_EQ("test", str); +} } |