public void stWriteParseTest3() { FileComponentAccessor target = new FileComponentAccessor(); target.parse("[File write(\"file\"): multi\nline\" \n 'data'.]"); Assert.AreEqual(" multi\nline\" \n 'data'.", target.parse("[File get(\"file\")]")); }
public void stReplaceParseTest4() { FileComponentAccessor target = new FileComponentAccessor(); target.parse("[File replace.Wildcards(\"file\", \"con*from \", \"\")]"); Assert.AreEqual("file", target.parse("[File get(\"file\")]")); }
public void stReplaceParseTest5() { FileComponentAccessor target = new FileComponentAccessor(); target.parse("[File replace.Regex(\"file\", \"t\\s*from\", \"t to\")]"); Assert.AreEqual("content to file", target.parse("[File get(\"file\")]")); }
public void stCallParseTest7() { FileComponentAccessor target = new FileComponentAccessor(); Assert.AreEqual("stdout", target.parse("[File call(\"file\", \"args\", 0)]")); Assert.AreEqual("silent stdout", target.parse("[File scall(\"file\", \"args\", 15)]")); Assert.AreEqual("silent stdout", target.parse("[File sout(\"file\", \"args\", 10)]")); }
public void stExistsParseTest2() { FileComponentAccessor target = new FileComponentAccessor(); string realDir = Path.GetDirectoryName(Assembly.GetAssembly(GetType()).Location); Assert.AreEqual(Value.VFALSE, target.parse("[File exists.directory(\"c:\\stubdir\\notexist\")]")); Assert.AreEqual(Value.VTRUE, target.parse("[File exists.directory(\"" + realDir + "\")]")); }
public void stExistsParseTest4() { FileComponentAccessor target = new FileComponentAccessor(); string realFile = Assembly.GetAssembly(GetType()).Location; Assert.AreEqual(Value.VFALSE, target.parse("[File exists.file(\"file\")]")); Assert.AreEqual(Value.VTRUE, target.parse("[File exists.file(\"" + realFile + "\")]")); }
public void stExistsParseTest3() { FileComponentAccessor target = new FileComponentAccessor(); Assert.AreEqual(Value.VFALSE, target.parse("[File exists.directory(\"System32\", false)]")); //Assert.AreEqual(Value.VFALSE, target.parse("[File exists.directory(\"" + realDir + "\", true)]")); Assert.AreEqual(Value.VTRUE, target.parse("[File exists.directory(\"System32\", true)]")); }
public void stExistsParseTest5() { FileComponentAccessor target = new FileComponentAccessor(); string realFile = Path.GetFileName(Assembly.GetAssembly(GetType()).Location); Assert.AreEqual(Value.VFALSE, target.parse("[File exists.file(\"cmd.exe\", false)]")); //Assert.AreEqual(Value.VFALSE, target.parse("[File exists.file(\"" + realFile + "\", true)]")); Assert.AreEqual(Value.VTRUE, target.parse("[File exists.file(\"cmd.exe\", true)]")); }
public void stWriteParseTest2() { FileComponentAccessor target = new FileComponentAccessor(); target.parse("[File write(\"file\"):data]"); Assert.AreEqual("data", target.parse("[File get(\"file\")]")); // append, writeLine, appendLine is identical for current accessor // however, also need checking the entry point as for the write() above: target.parse("[File append(\"file\"):data]"); Assert.AreEqual("data", target.parse("[File get(\"file\")]")); target.parse("[File writeLine(\"file\"):data]"); Assert.AreEqual("data", target.parse("[File get(\"file\")]")); target.parse("[File appendLine(\"file\"):data]"); Assert.AreEqual("data", target.parse("[File get(\"file\")]")); }
public void stWriteParseTest1() { FileComponentAccessor target = new FileComponentAccessor(); target.parse("[File write(\"file\")]"); }
public void stCallParseTest8() { FileComponentAccessor target = new FileComponentAccessor(); target.parse("[File call(\"file\", \"args\", )]"); }
public void stExistsParseTest1() { FileComponentAccessor target = new FileComponentAccessor(); target.parse("[File exists.stub(\"path\")]"); }
public void stWriteParseTest7() { FileComponentAccessor target = new FileComponentAccessor(); target.parse("[File write(\"file\", \"true\", \"true\", \"utf-8\"):data]"); }
public void stWriteParseTest9() { FileComponentAccessor target = new FileComponentAccessor(); target.parse("[File appendLine(\"file\", true, true, \"utf-8\"):data]"); }
public void stReplaceParseTest1() { FileComponentAccessor target = new FileComponentAccessor(); target.parse("[File replace(file, pattern, replacement)]"); }
public void stGetParseTest3() { FileComponentAccessor target = new FileComponentAccessor(true); target.parse("[File get(\"file\")]"); }
public void stGetParseTest2() { FileComponentAccessor target = new FileComponentAccessor(); Assert.AreEqual("content from file", target.parse("[File get(\"file\")]")); }
public void stWriteParseTest6() { FileComponentAccessor target = new FileComponentAccessor(); target.parse("[File write(\"file\", true, true):data]"); }
public void stCallParseTest2() { FileComponentAccessor target = new FileComponentAccessor(); target.parse("[File out(file)]"); }
public void stCallParseTest3() { FileComponentAccessor target = new FileComponentAccessor(); Assert.AreEqual("stdout", target.parse("[File call(\"file\")]")); Assert.AreEqual("stdout", target.parse("[File call(\"file\", \"args\")]")); Assert.AreEqual("silent stdout", target.parse("[File scall(\"file\")]")); Assert.AreEqual("silent stdout", target.parse("[File scall(\"file\", \"args\")]")); Assert.AreEqual("silent stdout", target.parse("[File sout(\"file\")]")); Assert.AreEqual("silent stdout", target.parse("[File sout(\"file\", \"args\")]")); }
public void stCallParseTest4() { FileComponentAccessor target = new FileComponentAccessor(true); target.parse("[File call(\"file\")]"); }