public void use_the_last_status_written() { var log = new RequestLog(); log.AddLog(12, new HttpStatusReport{Status = HttpStatusCode.Unauthorized}); log.AddLog(15, new HttpStatusReport{Status = HttpStatusCode.NotAcceptable}); log.HttpStatus.Status.ShouldEqual(HttpStatusCode.NotAcceptable); log.HttpStatus.Description.ShouldEqual("Not Acceptable"); }
public void add_log() { var log = new RequestLog(); var stringMessage = new StringMessage("something"); log.AddLog(123.45, stringMessage); log.AddLog(234, "something"); log.AllSteps() .ShouldHaveTheSameElementsAs(new RequestStep(123.45, stringMessage), new RequestStep(234, "something")); }
public void add_log() { var log = new RequestLog(); var stringMessage = new StringMessage("something"); log.AddLog(123.45, stringMessage); log.AddLog(234, "something"); log.AllSteps() .ShouldHaveTheSameElementsAs(new RequestStep(123.45, stringMessage), new RequestStep(234, "something")); }
public void use_the_last_status_written_with_custom_description() { var log = new RequestLog(); log.AddLog(12, new HttpStatusReport { Status = HttpStatusCode.Unauthorized }); log.AddLog(15, new HttpStatusReport { Status = HttpStatusCode.NotAcceptable, Description = "I didn't like this" }); log.HttpStatus.Status.ShouldEqual(HttpStatusCode.NotAcceptable); log.HttpStatus.Description.ShouldEqual("I didn't like this"); }
public void use_the_last_status_written() { var log = new RequestLog(); log.AddLog(12, new HttpStatusReport { Status = HttpStatusCode.Unauthorized }); log.AddLog(15, new HttpStatusReport { Status = HttpStatusCode.NotAcceptable }); log.HttpStatus.Status.ShouldEqual(HttpStatusCode.NotAcceptable); log.HttpStatus.Description.ShouldEqual("Not Acceptable"); }
public void find_step_negative() { var log = new RequestLog(); log.AddLog(10, new Fake { Name = "Jeremy" }); log.AddLog(12, new Fake { Name = "Lindsey" }); log.AddLog(13, new Fake { Name = "Max" }); log.AddLog(15, new Fake { Name = "Shiner" }); log.FindStep <Fake>(x => x.Name == "Josh").ShouldBeNull(); }
private void logStartAndFinish(double start, double finish) { var correlation = new BehaviorCorrelation(theNode); theLog.AddLog(start, new BehaviorStart(correlation)); theLog.AddLog(finish, new BehaviorFinish(correlation)); }
public void find_step_positive() { var log = new RequestLog(); log.AddLog(10, new Fake { Name = "Jeremy" }); log.AddLog(12, new Fake { Name = "Lindsey" }); log.AddLog(13, new Fake { Name = "Max" }); log.AddLog(15, new Fake { Name = "Shiner" }); var step = log.FindStep <Fake>(x => x.Name == "Shiner"); step.Log.Name.ShouldEqual("Shiner"); step.RequestTimeInMilliseconds.ShouldEqual(15); }
public void find_step_positive() { var log = new RequestLog(); log.AddLog(10, new Fake{Name = "Jeremy"}); log.AddLog(12, new Fake{Name = "Lindsey"}); log.AddLog(13, new Fake{Name = "Max"}); log.AddLog(15, new Fake{Name = "Shiner"}); var step = log.FindStep<Fake>(x => x.Name == "Shiner"); step.Log.Name.ShouldEqual("Shiner"); step.RequestTimeInMilliseconds.ShouldEqual(15); }
public void use_the_last_status_written_with_custom_description() { var log = new RequestLog(); log.AddLog(12, new HttpStatusReport { Status = HttpStatusCode.Unauthorized }); log.AddLog(15, new HttpStatusReport { Status = HttpStatusCode.NotAcceptable, Description = "I didn't like this"}); log.HttpStatus.Status.ShouldEqual(HttpStatusCode.NotAcceptable); log.HttpStatus.Description.ShouldEqual("I didn't like this"); }
public void find_step_negative() { var log = new RequestLog(); log.AddLog(10, new Fake { Name = "Jeremy" }); log.AddLog(12, new Fake { Name = "Lindsey" }); log.AddLog(13, new Fake { Name = "Max" }); log.AddLog(15, new Fake { Name = "Shiner" }); log.FindStep<Fake>(x => x.Name == "Josh").ShouldBeNull(); }