public void save_ArgumentException_InvalidDestination_null() { string json = ""; using (StreamReader sr = new StreamReader(@"Resources\test.json")) { json = sr.ReadToEnd(); } HttpPostedFileBase file = new MemoryFile(ToStream(json), "", "test.json"); HttpFileProcessingService.save(file, null); }
public void save_FileCreated() { string json = ""; using (StreamReader sr = new StreamReader(@"Resources\test.json")) { json = sr.ReadToEnd(); } string destination = @"\menufiles\"; HttpPostedFileBase file = new MemoryFile(ToStream(json), "", "test.json"); HttpFileProcessingService.save(file, destination); string contents; using (StreamReader sr = new StreamReader(destination + "test.json")) { contents = sr.ReadToEnd(); } Assert.IsNotNull(contents); }