public void SanitizeMeasurementsTrimsLeadingAndTrailingSpaceInKeyNames() { const string OriginalKey = " key with spaces "; const double OriginalValue = 42.0; var original = new Dictionary <string, double> { { OriginalKey, OriginalValue } }; original.SanitizeMeasurements(); string sanitizedKey = OriginalKey.Trim(); Assert.Equal(new[] { new KeyValuePair <string, double>(sanitizedKey, OriginalValue) }, original); }
public void SanitizePropertiesTrimsLeadingAndTrailingSpaceInKeyNames() { const string OriginalKey = " key with spaces "; const string OriginalValue = "Test Value"; var original = new Dictionary <string, string> { { OriginalKey, OriginalValue } }; original.SanitizeProperties(); string sanitizedKey = OriginalKey.Trim(); Assert.Equal(new[] { new KeyValuePair <string, string>(sanitizedKey, OriginalValue) }, original); }