public void MetricSpace_WhenCombiningThreeKeys_ShouldMatchPattern() { var space = new MetricSpace(Key1); var sut = space.Space(Key2); var metricInfo = new MetricInfo(); sut.Meter(Key3).Send(metricInfo); var result = metricInfo.Key; Assert.Equal($"{Key1}.{Key2}.{Key3}", result); }
public void MetricSpace_WhenReplcingKeyFormater_ShouldMatchPattern() { var space = new MetricSpace(Key1); space.Options.KeyFormater = new TestFormatter(); var sut = space.Space(Key2); var metricInfo = new MetricInfo(); sut.Meter(Key3).Send(metricInfo); var result = metricInfo.Key; Assert.Equal(TestFormatter.Key, result); }
public void MetricSpace_WhenUsingDifferntDelimiterOnMultiSpace_ShouldMatchPattern() { const string delimiter = ";"; var space = new MetricSpace(Key1); space.Options.KeysDelimiter = delimiter; var sut = space.Space(Key2); var metricInfo = new MetricInfo(); sut.Meter(Key3).Send(metricInfo); var result = metricInfo.Key; Assert.Equal($"{Key1}{delimiter}{Key2}{delimiter}{Key3}", result); }