public void TimeSeriesId_ToArrayWith1StringKey() { // Arrange var key1 = "B17"; var tsiId = new TimeSeriesId(key1); // Act var idAsArray = tsiId.ToStringArray(); // Assert idAsArray.Should().Equal(new string[] { key1 }); }
internal static IDictionary<string, object> BuildMessageBase(TimeSeriesIdProperty[] timeSeriesIdProperties, TimeSeriesId tsiId) { var messageBase = new Dictionary<string, object>(); string[] tsiIdArray = tsiId.ToStringArray(); for (int i = 0; i < timeSeriesIdProperties.Count(); i++) { TimeSeriesIdProperty idProperty = timeSeriesIdProperties[i]; string tsiIdValue = tsiIdArray[i]; messageBase[idProperty.Name] = tsiIdValue; } return messageBase; }
public void TimeSeriesId_ToArrayWith3StringKeys() { // Arrange var key1 = "B17"; var key2 = "F1"; var key3 = "R1"; var tsiId = new TimeSeriesId(key1, key2, key3); // Act var idAsArray = tsiId.ToStringArray(); // Assert idAsArray.Should().Equal(new string[] { key1, key2, key3 }); }