Skip to content

Commit

Permalink
assert that we get an error when trying to find a service that doesn'…
Browse files Browse the repository at this point in the history
…t exist
  • Loading branch information
AO-StreetArt committed Jul 19, 2018
1 parent ab91bb8 commit 20eccd4
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions aossl/profile/profile_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,14 @@ int main(int argc, char** argv) {
assert(s->get_address() == found_service->get_address());
assert(s->get_port() == found_service->get_port());
// Ask the Network Profile for an instance of the TestService
AOSSL::ServiceInterface *found_service2 = \
startup_profile.get_service(std::string("TestService-1"));
assert(found_service2);
assert(found_service2->get_address().empty());
bool error_finding = false;
try {
AOSSL::ServiceInterface *found_service2 = \
startup_profile.get_service(std::string("TestService-1"));
} catch (std::exception& e) {
error_finding = true;
}
assert(error_finding);
delete s;
delete found_service;
}

0 comments on commit 20eccd4

Please sign in to comment.