public void TestFixtureSetUp() { Directory.CreateDirectory("MementoDirectory"); string instance1 = "<Instance Key=\"Red\" Type=\"Color\"><Property Name=\"Color\" Value=\"Red\" /></Instance>"; string instance2 = "<Instance Key=\"Blue\" Type=\"Color\"><Property Name=\"Color\" Value=\"Blue\" /></Instance>"; string instance3 = "<Instance Key=\"Bigger\" Type=\"GreaterThan\"><Property Name=\"Attribute\" Value=\"MyDad\" /><Property Name=\"Value\" Value=\"10\" /></Instance>"; writeFile(instance1, Path.Combine("MementoDirectory", "Red.xml")); writeFile(instance2, Path.Combine("MementoDirectory", "Blue.xml")); writeFile(instance3, Path.Combine("MementoDirectory", "Bigger.xml")); _source = new DirectoryXmlMementoSource("MementoDirectory", "xml", XmlMementoStyle.NodeNormalized); }
public void ValidateIsNotSuccessfulWithADirectoryItCannotFind() { var source = new DirectoryXmlMementoSource("NotARealDirectory", "xml", XmlMementoStyle.NodeNormalized); source.Validate(); }