Beispiel #1
0
        public XmlPokeFixture(bool xmlExists = true)
        {
            Settings = new XmlPokeSettings();

            var environment = FakeEnvironment.CreateUnixEnvironment();
            var fileSystem  = new FakeFileSystem(environment);

            fileSystem.CreateDirectory("/Working");

            if (xmlExists)
            {
                var xmlFile = fileSystem.CreateFile("/Working/web.config").SetContent(Resources.XmlPoke_Xml);
                XmlPath = xmlFile.Path;
            }

            FileSystem = fileSystem;

            Context = Substitute.For <ICakeContext>();
            Context.FileSystem.Returns(FileSystem);
            Context.Environment.Returns(environment);
        }
Beispiel #2
0
 public string XmlPokeString(string sourceXml, string xpath, string value, XmlPokeSettings settings)
 {
     return(AeroContext.XmlPokeString(sourceXml, xpath, value, settings));
 }
Beispiel #3
0
 public void XmlPoke(FilePath filePath, string xpath, string value, XmlPokeSettings settings)
 {
     AeroContext.XmlPoke(filePath, xpath, value, settings);
 }