test treewide: apply namespace best practice

1. put sources into the namespace under test
2. put all test codes into anonymous namespace

It can be proved that this can increase readability and save duplicate
codes.

Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: If0685ca955c9ece5be5e2287ccbde1a302e4dacd
diff --git a/redfish-core/ut/lock_test.cpp b/redfish-core/ut/lock_test.cpp
index 7ee2b71..10c51d3 100644
--- a/redfish-core/ut/lock_test.cpp
+++ b/redfish-core/ut/lock_test.cpp
@@ -4,10 +4,11 @@
 
 #include "gmock/gmock.h"
 
-namespace crow
+namespace crow::ibm_mc_lock
 {
-namespace ibm_mc_lock
+namespace
 {
+
 using SType = std::string;
 using LockRequest = std::tuple<SType, SType, SType, uint64_t, SegmentFlags>;
 using LockRequests = std::vector<LockRequest>;
@@ -354,5 +355,5 @@
     ASSERT_EQ(1, result.size());
 }
 
-} // namespace ibm_mc_lock
-} // namespace crow
+} // namespace
+} // namespace crow::ibm_mc_lock