public void Append_Data_Into_A_Single_Data() { var data1 = new TelemetryData { ["A"] = "X", ["B"] = "Y", }; TelemetryData data2 = null; var data3 = new TelemetryData { ["B"] = "Z", ["C"] = "Z", }; var result = new TelemetryData(); // ReSharper disable once ExpressionIsAlwaysNull var dataToAppend = new[] { data1, data2, data3 }; result.AppendAll(dataToAppend); var expected = new Dictionary <string, string>() { ["A"] = "X", ["B"] = "Y", ["C"] = "Z", }; Check.That(result.GetDictionary()).ContainsExactly(expected); }
public void Do_Nothing_If_AppendAll_Content_Is_Null() { var result = new TelemetryData(); Check.ThatCode(() => result.AppendAll(null)).Throws <ArgumentNullException>(); }