public IActionResult SubmitModel(OnboardingModel model) { var persistence = new FilePersistenceService(model); persistence.Save(); return(Ok(new OnboardingModel())); }
public void RenkoBar_Persistence_Works() { //Arrange var destinationFile = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName()); var filePersistence = new FilePersistenceService(); var fileWriter = filePersistence.CreateFileWriter(destinationFile); var renkoBars = new RenkoBars(100, 10, 1, fileWriter); //Action renkoBars.Write(DateTime.Now.Ticks, 1); fileWriter.Close(); //Assert Assert.IsTrue(File.Exists(destinationFile)); Assert.IsTrue(new FileInfo(destinationFile).Length > 0); }