public void LoadFile_WhenItReceivesAFilePath_ItReturnsTheFileContents() { // Act var result = _reader.LoadFile(TEST_FILE); // Assert Assert.That(result.ToString(), Is.EqualTo(_expectedResult.ToString())); }
public float LogPerformanceJson(string filePathOne, string filePathTwo) { var stopwatch = new Stopwatch(); var time = new List <float>(); for (var x = 0; x < 1000; x++) { stopwatch.Start(); BuildDifferenceOutputFromJson( _jsonReader.GetArray(_jsonReader.LoadFile(filePathOne)["items"].ToString()), _jsonReader.GetArray(_jsonReader.LoadFile(filePathTwo)["items"].ToString()) ); stopwatch.Stop(); time.Add(stopwatch.ElapsedMilliseconds); stopwatch.Reset(); } return(time.Average()); }