public void TestAverageResponseTimeExcludingTopAndBottomDeciles() { var testResults = new testResults(); const string request = "/Test.hml"; const int end = 10; for (int i = 1; i < end; i++) { testResults.httpSample.Add(new testResultsHttpSample { t = i, lb = request, ts = 1321978933941 }); } var processor = new TestResultsProcessor(testResults); processor.CreateDataResults(); var result = processor.DataResults.First().AverageResponseTimeExcludingTopAndBottomDeciles; const int expectedResult = 5; Assert.That(result == expectedResult, "Expected: {0}, but was {1}", expectedResult, result); }
public static bool LoadFromFile(string fileName, out testResults obj) { System.Exception exception = null; return LoadFromFile(fileName, out obj, out exception); }
/// <summary> /// Deserializes xml markup from file into an testResults object /// </summary> /// <param name="fileName">string xml file to load and deserialize</param> /// <param name="obj">Output testResults object</param> /// <param name="exception">output Exception value if deserialize failed</param> /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns> public static bool LoadFromFile(string fileName, out testResults obj, out System.Exception exception) { exception = null; obj = default(testResults); try { obj = LoadFromFile(fileName); return true; } catch (System.Exception ex) { exception = ex; return false; } }
public static bool Deserialize(string xml, out testResults obj) { System.Exception exception = null; return Deserialize(xml, out obj, out exception); }
/// <summary> /// Deserializes workflow markup into an testResults object /// </summary> /// <param name="xml">string workflow markup to deserialize</param> /// <param name="obj">Output testResults object</param> /// <param name="exception">output Exception value if deserialize failed</param> /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns> public static bool Deserialize(string xml, out testResults obj, out System.Exception exception) { exception = null; obj = default(testResults); try { obj = Deserialize(xml); return true; } catch (System.Exception ex) { exception = ex; return false; } }
public void TestMinResponseTimeExcludingTopDecile() { var testResults = new testResults(); const string request = "/Test.hml"; const int start = 1; for (int i = start; i < 11; i++) { testResults.httpSample.Add(new testResultsHttpSample { t = i, lb = request, ts = 1321978933941 }); } var processor = new TestResultsProcessor(testResults); processor.CreateDataResults(); var result = processor.DataResults.First().MinResponseTimeExcludingTopDecile; const int expectedResult = start + 1; Assert.That(result == expectedResult, "Expected: {0}, but was {1}", expectedResult, result); }
public TestResultsBuilder() { _testResults = new testResults(); }
public TestResultsProcessor(testResults testResults) { _testResults = testResults; }