public void NullPerformance() { using (var client = new DatumClient()) { client.LogPerformance(null); } }
public void LogOccurrenceSessionNull() { var perf = this.Occurrence(); perf.SessionIdentifier = null; using (var client = new DatumClient()) { client.LogPerformance(perf); } var source = new Server.Core.LogCore(); var query = new Server.Contracts.LogQuery() { ApplicationIdentifier = Settings.ApplicationIdentifier, }; var occurance = (from data in source.SelectOccurrences(query) where perf.Message == data.Message select data).FirstOrDefault(); Assert.IsNotNull(occurance, "Occurrence should not be null"); Assert.AreEqual <Guid>(perf.Token.ApplicationId, occurance.Token.ApplicationId, "Application Id should match"); Assert.AreEqual <DateTime>(perf.OccurredOn.Date, occurance.OccurredOn.Date, "Occurred On should match"); Assert.AreEqual <string>(perf.MachineName, occurance.MachineName, "Machine Name should match"); Assert.AreEqual <string>(perf.Message, occurance.Message, "Message should match"); Assert.AreEqual <string>(perf.Class, occurance.Class, "Type should match"); Assert.AreEqual <TimeSpan>(perf.Duration, occurance.Duration, "Duration should match"); Assert.AreEqual <string>(perf.Method, occurance.Method, "Method should match"); Assert.AreEqual <int>(perf.ThreadId, occurance.ThreadId, "Thread Id should match"); Assert.AreEqual <Guid?>(perf.SessionIdentifier, occurance.SessionIdentifier, "Session Identifier should match"); }
public void PerformanceInvalidMethod() { using (var client = new DatumClient()) { var perf = this.Occurrence(); perf.Method = StringHelper.NullEmptyWhiteSpace(); client.LogPerformance(perf); } }
public void PerformanceZeroExecutionTime() { using (var client = new DatumClient()) { var perf = this.Occurrence(); perf.Duration = TimeSpan.Zero; client.LogPerformance(perf); } }
public void PerformanceZeroThreadId() { using (var client = new DatumClient()) { var perf = this.Occurrence(); perf.ThreadId = 0; client.LogPerformance(perf); } }
public void PerformanceEmptyAppId() { using (var client = new DatumClient()) { var perf = this.Occurrence(); perf.Token.ApplicationId = Guid.Empty; client.LogPerformance(perf); } }
public void NullPerformanceToken() { using (var client = new DatumClient()) { var perf = this.Occurrence(); perf.Token = null; client.LogPerformance(perf); } }