public void Metrics_Are_Recorded() { MetricServiceMock.Verify(s => s.Record( It.Is <string>(x => x == Metric.DownloadTime), It.Is <TimeSpan>(x => x > TimeSpan.Zero)), Times.Once); MetricServiceMock.Verify(s => s.Record( It.Is <string>(x => x == Metric.FileSize), It.Is <int>(x => x == ExpectedDownloadFile.Length)), Times.Once); MetricServiceMock.Verify(s => s.Record( It.Is <string>(x => x == Metric.Version), It.Is <string>(x => x == Version)), Times.Once); MetricServiceMock.Verify(s => s.Record( It.Is <string>(x => x == Metric.DetectFileTypeTime), It.Is <TimeSpan>(x => x > TimeSpan.Zero)), Times.Once); MetricServiceMock.VerifyNoOtherCalls(); }
public void Metrics_Are_Recorded() { MetricServiceMock.Verify(s => s.Record( It.Is <string>(x => x == Metric.FormFileReadTime), It.Is <TimeSpan>(x => x > TimeSpan.Zero)), Times.Once); MetricServiceMock.Verify(s => s.Record( It.Is <string>(x => x == Metric.FileSize), It.Is <long>(x => x == ValidFileBytes.Length)), Times.Once); MetricServiceMock.Verify(s => s.Record( It.Is <string>(x => x == Metric.Version), It.Is <string>(x => x == Version)), Times.Once); MetricServiceMock.Verify(s => s.Record( It.Is <string>(x => x == Metric.DetectFileTypeTime), It.Is <TimeSpan>(x => x > TimeSpan.Zero)), Times.Once); MetricServiceMock.VerifyNoOtherCalls(); }
public void Metrics_Are_Recorded() { MetricServiceMock.Verify(s => s.Record( It.Is <string>(x => x == Metric.DownloadTime), It.Is <TimeSpan>(x => x > TimeSpan.Zero)), Times.Once); MetricServiceMock.Verify(s => s.Record( It.Is <string>(x => x == Metric.FileSize), It.Is <int>(x => x == 0)), Times.Once); MetricServiceMock.VerifyNoOtherCalls(); }
public void Metrics_Are_Recorded(string base64) { ClassInTest.RebuildFromBase64(new Base64Request { Base64 = base64 }); MetricServiceMock.Verify(s => s.Record( It.Is <string>(x => x == Metric.Base64DecodeTime), It.Is <TimeSpan>(x => x > TimeSpan.Zero)), Times.Once); MetricServiceMock.Verify(s => s.Record( It.Is <string>(x => x == Metric.FileSize), It.Is <int>(x => x == 0)), Times.Once); MetricServiceMock.VerifyNoOtherCalls(); }