private ByFileRootAssemblyElementCollection DeserializeFromXmlFragment(string xmlFragment) { var collection = new ByFileRootAssemblyElementCollection(); ConfigurationHelper.DeserializeElement(collection, xmlFragment); return(collection); }
public void Add() { var element1 = new ByFileIncludeRootAssemblyElement { FilePattern = "*.dll", IncludeReferencedAssemblies = true }; var element2 = new ByFileIncludeRootAssemblyElement { FilePattern = "*.exe" }; var element3 = new ByFileExcludeRootAssemblyElement { FilePattern = "Utilities.exe" }; var collection = new ByFileRootAssemblyElementCollection(); collection.Add(element1); collection.Add(element2); collection.Add(element3); ByFileRootAssemblyElementBase[] result = collection.ToArray(); Assert.That(result, Is.EqualTo(new ByFileRootAssemblyElementBase[] { element1, element2, element3 })); }