public void SetAdditionnalInfosTest() { COMTrade comTrade = new COMTrade(); comTrade.SetAdditionnalInfos(new string[2] { "Foo", "Bar" }); var actual = comTrade.GetAdditionnalInfos(); Assert.IsTrue(actual.GetType().Equals(typeof(string[]))); //System.Diagnostics.Debug.Print(actual); }
public void Send(string operatorName, double price, int quantity) { COMUnderlyingInfos underlyingInfos = new COMUnderlyingInfos(); underlyingInfos.Add( new COMUnderlying() { SourceType = COMEnumUnderlyingSourceType.REUTERS, ProductType = COMEnumUnderlyingProductType.STOCK, Code = "BHP.AX" }); underlyingInfos.Add( new COMUnderlying() { SourceType = COMEnumUnderlyingSourceType.BLOOMBERG, ProductType = COMEnumUnderlyingProductType.INDEX, Code = "SX5E" }); COMTrade comTrade = new COMTrade() { OperatorName = operatorName, Price = price, Quantity = quantity, UnderlyingInfos = underlyingInfos }; comTrade.SetAdditionnalInfos(new string[2] { "Foo", "Bar" }); var actual = _comOrderBookingManager.Send(comTrade); Assert.IsInstanceOf(typeof(string), actual); Assert.IsNotNull(actual); Assert.IsTrue(actual.Contains("Foo")); Assert.IsTrue(actual.Contains("Bar")); System.Diagnostics.Debug.Print(actual); }