From b73830333b273ac44f38dcf9c252fa22af788384 Mon Sep 17 00:00:00 2001 From: kosyloa Date: Fri, 12 Apr 2024 14:57:50 +0200 Subject: [PATCH] add test for normalize symbol --- .../Events/Market/Candles/CandleSymbol.swift | 10 ++++++++++ .../Market/Candles/MarketEventSymbols.swift | 4 ++++ DXFeedFrameworkTests/CandleTests.swift | 20 +++++++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/DXFeedFramework/Events/Market/Candles/CandleSymbol.swift b/DXFeedFramework/Events/Market/Candles/CandleSymbol.swift index dca9d8f22..30061a86f 100644 --- a/DXFeedFramework/Events/Market/Candles/CandleSymbol.swift +++ b/DXFeedFramework/Events/Market/Candles/CandleSymbol.swift @@ -105,6 +105,16 @@ public class CandleSymbol: CustomStringConvertible { public static func valueOf(_ symbol: String, _ properties: [ICandleSymbolProperty]) -> CandleSymbol { return CandleSymbol(symbol, properties) } + + /// Converts the given string symbol into the candle symbol object with the specified attribute set. + /// + /// - Parameters: + /// - symbol:The string symbol. + /// - attributes: The attributes variadic. + /// - Throws: ArgumentException/invalidOperationException(_:) + public static func valueOf(_ symbol: String, _ properties: ICandleSymbolProperty...) -> CandleSymbol { + return CandleSymbol(symbol, properties) + } } extension CandleSymbol: Equatable { diff --git a/DXFeedFramework/Events/Market/Candles/MarketEventSymbols.swift b/DXFeedFramework/Events/Market/Candles/MarketEventSymbols.swift index 43ded71eb..2186fb885 100644 --- a/DXFeedFramework/Events/Market/Candles/MarketEventSymbols.swift +++ b/DXFeedFramework/Events/Market/Candles/MarketEventSymbols.swift @@ -292,6 +292,8 @@ public class MarketEventSymbols { symbol[0.. key && !added { @@ -306,6 +308,8 @@ public class MarketEventSymbols { index = jindex } } + } else { + print("NULLL") } } return added ? symbol : (symbol[0..