[WebRTC][TCSACR-535] Change WebRTC Stats enum values and deprecate one 19/290719/1
authorHaesu Gwon <haesu.gwon@samsung.com>
Fri, 31 Mar 2023 07:23:30 +0000 (16:23 +0900)
committerHaesu Gwon <haesu.gwon@samsung.com>
Fri, 31 Mar 2023 07:23:30 +0000 (16:23 +0900)
Change-Id: I17e139001956c9bbd05be4712c17697265cacdff

tct-suite-vs/Tizen.WebRTC.Tests/testcase/TSWebRTC.statistics.cs

index dd304cf..7b927e4 100755 (executable)
@@ -26,6 +26,16 @@ namespace Tizen.Multimedia.Remoting.Tests {
     {
         private WebRTC _webRtc;
 
+        // WebRTCStatisticsCategory.All was deprecated in API11.
+        private const WebRTCStatisticsCategory _webRTCStatisticsCategoryAll = WebRTCStatisticsCategory.Codec |
+                                                                              WebRTCStatisticsCategory.InboundRtp |
+                                                                              WebRTCStatisticsCategory.OutboundRtp |
+                                                                              WebRTCStatisticsCategory.RemoteInboundRtp |
+                                                                              WebRTCStatisticsCategory.RemoteOutboundRtp |
+                                                                              WebRTCStatisticsCategory.CandidatePair |
+                                                                              WebRTCStatisticsCategory.LocalCandidate |
+                                                                              WebRTCStatisticsCategory.RemoteCandidate;
+
         private readonly string _turnServer = "turn://turnserver.address";
 
         [SetUp]
@@ -124,7 +134,7 @@ namespace Tizen.Multimedia.Remoting.Tests {
                     var stats = offerClient.GetStatistics(category);
                     foreach (var stat in stats)
                     {
-                        if (category == WebRTCStatisticsCategory.All)
+                        if (category == _webRTCStatisticsCategoryAll)
                         {
                             Assert.That(Enum.IsDefined(typeof(WebRTCStatisticsCategory), stat.Category),
                                 "Should be one of WebRTCStatisticsCategory");
@@ -178,7 +188,7 @@ namespace Tizen.Multimedia.Remoting.Tests {
 
                 await ConnectPeerAsync(offerClient, answerClient);
 
-                var stats = offerClient.GetStatistics(WebRTCStatisticsCategory.Codec);
+                var stats = offerClient.GetStatistics(_webRTCStatisticsCategoryAll);
                 foreach (var stat in stats)
                 {
                     Assert.That(Enum.IsDefined(typeof(WebRTCStatisticsProperty), stat.Property),