Use nested namespace

Nested namespace is introduced in C++ 17. This saves nearly 50 lines.
This change also puts tests into a nested namespace, which saves
unnecessary using directives.

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: I7c3e38588fd5c2cbd83ac13ee24327318e8c06a4
diff --git a/test/certs_manager_test.cpp b/test/certs_manager_test.cpp
index 38c563a..1131df1 100644
--- a/test/certs_manager_test.cpp
+++ b/test/certs_manager_test.cpp
@@ -20,12 +20,16 @@
 #include <xyz/openbmc_project/Common/error.hpp>
 
 #include <gtest/gtest.h>
+
+namespace phosphor::certs
+{
+namespace
+{
 namespace fs = std::filesystem;
 using InternalFailure =
     sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
 using InvalidCertificate =
     sdbusplus::xyz::openbmc_project::Certs::Error::InvalidCertificate;
-using namespace phosphor::certs;
 
 /**
  * Class to generate certificate file and test verification of certificate file
@@ -1380,3 +1384,5 @@
                     std::move(installPath));
     EXPECT_TRUE(fs::exists(rsaPrivateKeyFilePath));
 }
+} // namespace
+} // namespace phosphor::certs