public void ShouldSaveScript() { const string expectedContent = "public class Test { }"; const string expectedPath = ScriptDirectory + "/TestScript.cs"; ScriptUtils.SaveScript( expectedContent, ScriptDirectory, "TestScript" ); var fileContent = File.ReadAllText(expectedPath); Assert.AreEqual(expectedContent, fileContent); }
public void ShouldSaveScriptWithNamespaceDirectories() { const string expectedContent = "public class Test { }"; const string expectedPath = ScriptDirectory + "/Project/Namespace/TestScript.cs"; ScriptUtils.SaveScript( expectedContent, ScriptDirectory, "TestScript", "Project.Namespace" ); var fileContent = File.ReadAllText(expectedPath); Assert.AreEqual(expectedContent, fileContent); }