| 43 | CPPUNIT_TEST_SUITE_REGISTRATION(NetrcAuthResolverTest); |
| 44 | |
| 45 | void NetrcAuthResolverTest::testResolveAuthConfig_without_userDefined() |
| 46 | { |
| 47 | auto authConfig = resolver_->resolveAuthConfig("localhost"); |
| 48 | CPPUNIT_ASSERT_EQUAL(std::string("name:passwd"), authConfig->getAuthText()); |
| 49 | |
| 50 | authConfig = resolver_->resolveAuthConfig("mymachine"); |
| 51 | CPPUNIT_ASSERT_EQUAL(std::string("default:defaultpasswd"), |
| 52 | authConfig->getAuthText()); |
| 53 | |
| 54 | resolver_->setNetrc(nullptr); |
| 55 | authConfig = resolver_->resolveAuthConfig("localhost"); |
| 56 | CPPUNIT_ASSERT_EQUAL(std::string("foo:bar"), authConfig->getAuthText()); |
| 57 | } |
| 58 | |
| 59 | void NetrcAuthResolverTest::testResolveAuthConfig_with_userDefined() |
| 60 | { |
nothing calls this directly
no test coverage detected