From 325d78169620094178513303d65c71d933182ae4 Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Tue, 9 Dec 2014 23:35:00 +0100 Subject: Added a ResourceLocator stream test. --- test/core/ResourceLocatorTest.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'test/core/ResourceLocatorTest.cpp') 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 is = location.stream(); + + std::string str; + *is >> str; + + ASSERT_EQ("test", str); +} } -- cgit v1.2.3