IVGCVSW-3691 Basic refactoring in view of upcoming work in the profiler

Change-Id: Iea4550b864fc2adb04a3a2411a7ead06b1f60ab9
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
diff --git a/src/profiling/test/SendCounterPacketTests.cpp b/src/profiling/test/SendCounterPacketTests.cpp
index 5309560..626a5a6 100644
--- a/src/profiling/test/SendCounterPacketTests.cpp
+++ b/src/profiling/test/SendCounterPacketTests.cpp
@@ -68,7 +68,7 @@
         memcpy(buffer, message.c_str(), static_cast<unsigned int>(message.size()) + 1);
     }
 
-    void SendCounterDirectoryPacket(const Category& category, const std::vector<Counter>& counters) override
+    void SendCounterDirectoryPacket(const CounterDirectory& counterDirectory) override
     {
         std::string message("SendCounterDirectoryPacket");
         unsigned int reserved = 0;
@@ -114,9 +114,8 @@
 
     BOOST_TEST(strcmp(buffer, "SendStreamMetaDataPacket") == 0);
 
-    Category category;
-    std::vector<Counter> counters;
-    sendCounterPacket.SendCounterDirectoryPacket(category, counters);
+    CounterDirectory counterDirectory(1, "counter_directory", 0, 0, 0);
+    sendCounterPacket.SendCounterDirectoryPacket(counterDirectory);
 
     BOOST_TEST(strcmp(buffer, "SendCounterDirectoryPacket") == 0);
 
@@ -144,7 +143,7 @@
     uint32_t capturePeriod = 1000;
     std::vector<uint16_t> selectedCounterIds;
     BOOST_CHECK_THROW(sendPacket1.SendPeriodicCounterSelectionPacket(capturePeriod, selectedCounterIds),
-                      armnn::RuntimeException);
+                      armnn::profiling::BufferExhaustion);
 
     // Packet without any counters
     MockBuffer mockBuffer2(512);
@@ -284,7 +283,7 @@
     // Error no space left in buffer
     MockBuffer mockBuffer1(10);
     SendCounterPacket sendPacket1(mockBuffer1);
-    BOOST_CHECK_THROW(sendPacket1.SendStreamMetaDataPacket(), armnn::RuntimeException);
+    BOOST_CHECK_THROW(sendPacket1.SendStreamMetaDataPacket(), armnn::profiling::BufferExhaustion);
 
     // Full metadata packet