Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public class Valid
public void TestReportGeneration()
var sensorName = "TempSensor 1";
var fileName = "FileName.txt";
var sensor = new Sensor(sensorName, new List<double>() { 1.0D });
var fileSystemMock = Mock.Create<IFilesystem>();
var expectedContent =
fileSystemMock.Arrange((x) => fileSystemMock.WriteContentToFile(fileName, expectedContent)).MustBeCalled();
var reportGenerator = new PlainTextSensorReportGenerator(fileSystemMock);
reportGenerator.GenerateReport(sensor, fileName);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment