public void RootPathTest6() { { var name = GetName(); var root = GetRootFolder(name); var instance = new FakeInstance(GetRelativeFolder(root, "Website"), GetRelativeFolder(root.Parent, "data"), GetDatabases(name, GetRelativeFolder(root, "Databases"))); RootPathTest("#6 data is too far, but databases are fine (root/website, root/../data, root/databases)", root, instance); } }
public void RootPathTest1() { { var name = GetName(); var root = GetRootFolder(name); var instance = new FakeInstance(GetRelativeFolder(root, "Website"), GetRelativeFolder(root, "Data"), GetDatabases(name, GetRelativeFolder(root, "Databases"))); RootPathTest("#1 regular (root/website, root/data, root/databases)", root, instance); } }
public void RootPathTest4() { { var name = GetName(); var root = GetRootFolder(name); var instance = new FakeInstance(root, root, GetDatabases(name, root)); RootPathTest("#4 all are root (root, root, root)", root, instance); } }
public void RootPathTest3() { { var name = this.GetName(); var root = GetRootFolder(name); var instance = new FakeInstance(this.GetRelativeFolder(root, "Website"), this.GetRelativeFolder(root, "Website"), GetDatabases(name, this.GetRelativeFolder(root, "Databases"))); this.RootPathTest("#3 data is website (root/website, root/website, root/databases)", root, instance); } }
public void RootPathTest7() { { var name = GetName(); var root = GetRootFolder(name); var rootDrive = FileSystem.FileSystem.Local.Directory.GetDirectoryRoot(root.FullName); var drive = Environment.GetLogicalDrives().First(d => !d.EqualsIgnoreCase(rootDrive)); var instance = new FakeInstance(GetRelativeFolder(root, "Website"), GetRelativeFolder(root, "Data"), GetDatabases(name, new DirectoryInfo(drive + "databases"))); RootPathTest($"#7 databases on another drive (root/website, root/data, {drive}databases)", root, instance); } }
public void RootPathTest9() { { var name = GetName(); var root = GetRootFolder(name); var rootDrive = FileSystem.FileSystem.Local.Directory.GetDirectoryRoot(root.FullName); var drive = Environment.GetLogicalDrives().First(d => !d.EqualsIgnoreCase(rootDrive)); var instance = new FakeInstance(GetRelativeFolder(root, "Website"), GetRelativeFolder(root.Parent, "Data"), new Database[0]); RootPathTest($"#9 no databases, data too far (root/website, root/data, {drive}databases)", root, instance); } }
public void RootPathTest10() { { var name = this.GetName(); var root = GetRootFolder(name); var rootDrive = FileSystem.FileSystem.Local.Directory.GetDirectoryRoot(root.FullName); var drive = Environment.GetLogicalDrives().First(d => !d.EqualsIgnoreCase(rootDrive)); var website = this.GetRelativeFolder(root, "Website"); var instance = new FakeInstance(website, this.GetRelativeFolder(website, "Data"), new Database[0]); this.RootPathTest("#9 no databases, data is inside (root/website, root/website/data, " + drive + "databases)", website, instance); } }
public void RootPathTest() { { var name = this.GetName(); var root = GetRootFolder(name); var instance = new FakeInstance(this.GetRelativeFolder(root, "Website"), this.GetRelativeFolder(root, "Data"), GetDatabases(name, this.GetRelativeFolder(root, "Databases"))); this.RootPathTest("#1 regular (root/website, root/data, root/databases)", root, instance); } { var name = this.GetName(); var root = GetRootFolder(name); var instance = new FakeInstance(this.GetRelativeFolder(root, "Website"), this.GetRelativeFolder(root, "Website\\Data"), GetDatabases(name, this.GetRelativeFolder(root, "Databases"))); this.RootPathTest("#2 data inside (root/website, root/website/data, root/databases)", root, instance); } { var name = this.GetName(); var root = GetRootFolder(name); var instance = new FakeInstance(this.GetRelativeFolder(root, "Website"), this.GetRelativeFolder(root, "Website"), GetDatabases(name, this.GetRelativeFolder(root, "Databases"))); this.RootPathTest("#3 data is website (root/website, root/website, root/databases)", root, instance); } { var name = this.GetName(); var root = GetRootFolder(name); var instance = new FakeInstance(root, root, GetDatabases(name, root)); this.RootPathTest("#4 all are root (root, root, root)", root, instance); } { var name = this.GetName(); var root = GetRootFolder(name); var rootDrive = FileSystem.FileSystem.Local.Directory.GetDirectoryRoot(root.FullName); var drive = Environment.GetLogicalDrives().First(d => !d.EqualsIgnoreCase(rootDrive)); var instance = new FakeInstance(this.GetRelativeFolder(root, "Website"), new DirectoryInfo(drive + "data"), GetDatabases(name, this.GetRelativeFolder(root, "Databases"))); this.RootPathTest("#5 data on another drive (root/website, " + drive + "data, root/databases)", root, instance); } { var name = this.GetName(); var root = GetRootFolder(name); var instance = new FakeInstance(this.GetRelativeFolder(root, "Website"), this.GetRelativeFolder(root.Parent, "data"), GetDatabases(name, this.GetRelativeFolder(root, "Databases"))); this.RootPathTest("#6 data is too far, but databases are fine (root/website, root/../data, root/databases)", root, instance); } { var name = this.GetName(); var root = GetRootFolder(name); var rootDrive = FileSystem.FileSystem.Local.Directory.GetDirectoryRoot(root.FullName); var drive = Environment.GetLogicalDrives().First(d => !d.EqualsIgnoreCase(rootDrive)); var instance = new FakeInstance(this.GetRelativeFolder(root, "Website"), this.GetRelativeFolder(root, "Data"), GetDatabases(name, new DirectoryInfo(drive + "databases"))); this.RootPathTest("#7 databases on another drive (root/website, root/data, " + drive + "databases)", root, instance); } { var name = this.GetName(); var root = GetRootFolder(name); var rootDrive = FileSystem.FileSystem.Local.Directory.GetDirectoryRoot(root.FullName); var drive = Environment.GetLogicalDrives().First(d => !d.EqualsIgnoreCase(rootDrive)); var instance = new FakeInstance(this.GetRelativeFolder(root, "Website"), this.GetRelativeFolder(root.Parent, "Data"), GetDatabases(name, new DirectoryInfo(drive + "databases"))); this.RootPathTest("#8 databases on another drive, data too far (root/website, root/data, " + drive + "databases)", root, instance); } { var name = this.GetName(); var root = GetRootFolder(name); var rootDrive = FileSystem.FileSystem.Local.Directory.GetDirectoryRoot(root.FullName); var drive = Environment.GetLogicalDrives().First(d => !d.EqualsIgnoreCase(rootDrive)); var instance = new FakeInstance(this.GetRelativeFolder(root, "Website"), this.GetRelativeFolder(root.Parent, "Data"), new Database[0]); this.RootPathTest("#9 no databases, data too far (root/website, root/data, " + drive + "databases)", root, instance); } { var name = this.GetName(); var root = GetRootFolder(name); var rootDrive = FileSystem.FileSystem.Local.Directory.GetDirectoryRoot(root.FullName); var drive = Environment.GetLogicalDrives().First(d => !d.EqualsIgnoreCase(rootDrive)); var website = this.GetRelativeFolder(root, "Website"); var instance = new FakeInstance(website, this.GetRelativeFolder(website, "Data"), new Database[0]); this.RootPathTest("#9 no databases, data is inside (root/website, root/website/data, " + drive + "databases)", website, instance); } }
public void RootPathTest() { { var name = this.GetName(); var root = GetRootFolder(name); var instance = new FakeInstance(this.GetRelativeFolder(root, "Website"), this.GetRelativeFolder(root, "Data"), GetDatabases(name, this.GetRelativeFolder(root, "Databases"))); this.RootPathTest("#1 regular (root/website, root/data, root/databases)", root, instance); } { var name = this.GetName(); var root = GetRootFolder(name); var instance = new FakeInstance(this.GetRelativeFolder(root, "Website"), this.GetRelativeFolder(root, "Website\\Data"), GetDatabases(name, this.GetRelativeFolder(root, "Databases"))); this.RootPathTest("#2 data inside (root/website, root/website/data, root/databases)", root, instance); } { var name = this.GetName(); var root = GetRootFolder(name); var instance = new FakeInstance(this.GetRelativeFolder(root, "Website"), this.GetRelativeFolder(root, "Website"), GetDatabases(name, this.GetRelativeFolder(root, "Databases"))); this.RootPathTest("#3 data is website (root/website, root/website, root/databases)", root, instance); } { var name = this.GetName(); var root = GetRootFolder(name); var instance = new FakeInstance(root, root, GetDatabases(name, root)); this.RootPathTest("#4 all are root (root, root, root)", root, instance); } { var name = this.GetName(); var root = GetRootFolder(name); var rootDrive = FileSystem.FileSystem.Local.Directory.GetDirectoryRoot(root.FullName); var drive = Environment.GetLogicalDrives().First(d => !d.EqualsIgnoreCase(rootDrive)); var instance = new FakeInstance(this.GetRelativeFolder(root, "Website"), new DirectoryInfo(drive + "data"), GetDatabases(name, this.GetRelativeFolder(root, "Databases"))); this.RootPathTest("#5 data on another drive (root/website, " + drive + "data, root/databases)", root, instance); } { var name = this.GetName(); var root = GetRootFolder(name); var instance = new FakeInstance(this.GetRelativeFolder(root, "Website"), this.GetRelativeFolder(root.Parent, "data"), GetDatabases(name, this.GetRelativeFolder(root, "Databases"))); this.RootPathTest("#6 data is too far, but databases are fine (root/website, root/../data, root/databases)", root, instance); } { var name = this.GetName(); var root = GetRootFolder(name); var rootDrive = FileSystem.FileSystem.Local.Directory.GetDirectoryRoot(root.FullName); var drive = Environment.GetLogicalDrives().First(d => !d.EqualsIgnoreCase(rootDrive)); var instance = new FakeInstance(this.GetRelativeFolder(root, "Website"), this.GetRelativeFolder(root, "Data"), GetDatabases(name, new DirectoryInfo(drive + "databases"))); this.RootPathTest("#7 databases on another drive (root/website, root/data, " + drive + "databases)", root, instance); } { var name = this.GetName(); var root = GetRootFolder(name); var rootDrive = FileSystem.FileSystem.Local.Directory.GetDirectoryRoot(root.FullName); var drive = Environment.GetLogicalDrives().First(d => !d.EqualsIgnoreCase(rootDrive)); var instance = new FakeInstance(this.GetRelativeFolder(root, "Website"), this.GetRelativeFolder(root.Parent, "Data"), GetDatabases(name, new DirectoryInfo(drive + "databases"))); this.RootPathTest("#8 databases on another drive, data too far (root/website, root/data, " + drive + "databases)", root, instance, typeof(InvalidConfigurationException)); } { var name = this.GetName(); var root = GetRootFolder(name); var rootDrive = FileSystem.FileSystem.Local.Directory.GetDirectoryRoot(root.FullName); var drive = Environment.GetLogicalDrives().First(d => !d.EqualsIgnoreCase(rootDrive)); var instance = new FakeInstance(this.GetRelativeFolder(root, "Website"), this.GetRelativeFolder(root.Parent, "Data"), new Database[0]); this.RootPathTest("#9 no databases, data too far (root/website, root/data, " + drive + "databases)", root, instance, typeof(InvalidConfigurationException)); } { var name = this.GetName(); var root = GetRootFolder(name); var rootDrive = FileSystem.FileSystem.Local.Directory.GetDirectoryRoot(root.FullName); var drive = Environment.GetLogicalDrives().First(d => !d.EqualsIgnoreCase(rootDrive)); var website = this.GetRelativeFolder(root, "Website"); var instance = new FakeInstance(website, this.GetRelativeFolder(website, "Data"), new Database[0]); this.RootPathTest("#9 no databases, data is inside (root/website, root/website/data, " + drive + "databases)", website, instance); } }
public void RootPathTest9() { { var name = this.GetName(); var root = GetRootFolder(name); var rootDrive = FileSystem.FileSystem.Local.Directory.GetDirectoryRoot(root.FullName); var drive = Environment.GetLogicalDrives().First(d => !d.EqualsIgnoreCase(rootDrive)); var instance = new FakeInstance(this.GetRelativeFolder(root, "Website"), this.GetRelativeFolder(root.Parent, "Data"), new Database[0]); this.RootPathTest("#9 no databases, data too far (root/website, root/data, " + drive + "databases)", root, instance); } }
public void RootPathTest6() { { var name = this.GetName(); var root = GetRootFolder(name); var instance = new FakeInstance(this.GetRelativeFolder(root, "Website"), this.GetRelativeFolder(root.Parent, "data"), GetDatabases(name, this.GetRelativeFolder(root, "Databases"))); this.RootPathTest("#6 data is too far, but databases are fine (root/website, root/../data, root/databases)", root, instance); } }
public void RootPathTest5() { { var name = this.GetName(); var root = GetRootFolder(name); var rootDrive = FileSystem.FileSystem.Local.Directory.GetDirectoryRoot(root.FullName); var drive = Environment.GetLogicalDrives().First(d => !d.EqualsIgnoreCase(rootDrive)); var instance = new FakeInstance(this.GetRelativeFolder(root, "Website"), new DirectoryInfo(drive + "data"), GetDatabases(name, this.GetRelativeFolder(root, "Databases"))); this.RootPathTest("#5 data on another drive (root/website, " + drive + "data, root/databases)", root, instance); } }
public void RootPathTest4() { { var name = this.GetName(); var root = GetRootFolder(name); var instance = new FakeInstance(root, root, GetDatabases(name, root)); this.RootPathTest("#4 all are root (root, root, root)", root, instance); } }