public void XmsClientTelemInfoParseTest_IncorrectFormat() { // Act - Parse malformed header - 6 values var responseHeaders = new Dictionary <string, string> { { "x-ms-clitelem", "1,2,3,4,5,6" } }; var xmsCliTeleminfo = new XmsCliTelemInfoParser().ParseXMsTelemHeader(responseHeaders["x-ms-clitelem"], _coreLogger); // Assert _coreLogger.Received().Warning( Arg.Is( string.Format( CultureInfo.InvariantCulture, TelemetryError.XmsCliTelemMalformed, responseHeaders["x-ms-clitelem"]))); }
public void RemoveAdalUser_RemovesUserNoClientInfo_And_NoDisplayName() { // Arrange PopulateLegacyCache(_legacyCachePersistence); IDictionary <AdalTokenCacheKey, AdalResultWrapper> adalCacheBeforeDelete = AdalCacheOperations.Deserialize(_logger, _legacyCachePersistence.LoadCache()); Assert.AreEqual(6, adalCacheBeforeDelete.Count); // Act - nothing happens and a message is logged CacheFallbackOperations.RemoveAdalUser( _logger, _legacyCachePersistence, TestConstants.ClientId, "", ""); // Assert AssertCacheEntryCount(6); _logger.Received().Error(Arg.Is <string>(MsalErrorMessage.InternalErrorCacheEmptyUsername)); }