From b0d37fe3f16675454aa10882dd08ba3df31da5b1 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Fri, 24 May 2019 19:13:24 +0200 Subject: [PATCH] Aggiunto playlist x test, altri step di prova... --- MCC_UnitTest/InitSDK.playlist | 1 + MCC_UnitTest/TestSuite.cs | 55 +++++++++++++++++++++++++++++++++-- 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 MCC_UnitTest/InitSDK.playlist diff --git a/MCC_UnitTest/InitSDK.playlist b/MCC_UnitTest/InitSDK.playlist new file mode 100644 index 0000000..3e35313 --- /dev/null +++ b/MCC_UnitTest/InitSDK.playlist @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/MCC_UnitTest/TestSuite.cs b/MCC_UnitTest/TestSuite.cs index 33c3a0e..c6a900e 100644 --- a/MCC_UnitTest/TestSuite.cs +++ b/MCC_UnitTest/TestSuite.cs @@ -202,6 +202,7 @@ namespace MCC_UnitTest #endregion #region Test reset REDIS +#if false [TestMethod] public void Test_RedisReset() @@ -213,6 +214,8 @@ namespace MCC_UnitTest } // act + //MCC.forceRedisFlush(); + //MCC = null; MCC = new MConnectClient(); // init async... @@ -222,13 +225,61 @@ namespace MCC_UnitTest reqStatus = taskResult.Result; // assert - Assert.IsTrue(reqStatus.LocalStatusOk); - } + Assert.IsTrue(reqStatus.IsAuth); + } +#endif #endregion #region Test AUTH + ENROLL + [TestMethod] + public void Test_isAuth() + { + // arrange + if (_cts != null) + { + _cts.Cancel(); + } + + // act + //MCC.forceRedisFlush(); + //MCC = null; + MCC = new MConnectClient(); + + // init async... + Task taskResult = MCC.InitSDKAsync(confFilePath, CancellationToken.None); + + // converto il risultato restituito... + reqStatus = taskResult.Result; + + // assert + Assert.IsTrue(reqStatus.IsAuth); + } + [TestMethod] + public void Test_isHmiEnrolled() + { + // arrange + if (_cts != null) + { + _cts.Cancel(); + } + + // act + //MCC.forceRedisFlush(); + //MCC = null; + MCC = new MConnectClient(); + + // init async... + Task taskResult = MCC.InitSDKAsync(confFilePath, CancellationToken.None); + + // converto il risultato restituito... + reqStatus = taskResult.Result; + + // assert + Assert.IsTrue(reqStatus.IsHmiEnrolled); + } + #endregion #region Test INFO UTENTI