public void SaveFiles() { var requestModels = _dbContext.RequestModels; foreach (var requestModel in requestModels) { _requestModelXmlFileSaver.SaveRequestModelXmlFile(requestModel); } }
public void SaveXmlFilesForRequest_Valid() { var request = new RequestModel() { Index = 1, Name = "testing", Date = DateTime.Parse("2018-02-05"), Visits = 4 }; var path = _requestModelXmlFileSaver.BuildPath(request); var fileName = _requestModelXmlFileSaver.BuildFileName(request); var fullPath = $"{path}/{fileName}"; _requestModelXmlFileSaver.SaveRequestModelXmlFile(request); Assert.IsTrue(System.IO.File.Exists(fullPath)); }