public void OneChildNoOverlapTest()
        {
            VirtualMachineConfig config1 = new VirtualMachineConfig();

            config1.File = Guid.NewGuid().ToString();
            config1.Host = Guid.NewGuid().ToString();

            VirtualMachineConfig config2 = new VirtualMachineConfig();

            config2.File = Guid.NewGuid().ToString();
            config2.Host = Guid.NewGuid().ToString();

            SnapshotConfig snapshot1 = new SnapshotConfig();

            config2.Snapshots.Add(snapshot1);
            SnapshotsConfig snapshots1 = new SnapshotsConfig();

            snapshots1.Add(snapshot1);

            Assert.IsFalse(config1.Overlaps(config2));
            Assert.IsFalse(config2.Overlaps(config1));
        }
        public void TwoChildrenOverlapTest()
        {
            VirtualMachineConfig config1 = new VirtualMachineConfig();

            config1.File = Guid.NewGuid().ToString();
            config1.Host = Guid.NewGuid().ToString();

            VirtualMachineConfig config2 = new VirtualMachineConfig();

            config2.File = Guid.NewGuid().ToString();
            config2.Host = Guid.NewGuid().ToString();

            // a snapshot child with a virtual machine
            SnapshotConfig  snapshot0  = new SnapshotConfig();
            SnapshotsConfig snapshots0 = new SnapshotsConfig();

            snapshots0.Add(snapshot0);
            VirtualMachineConfig config3 = new VirtualMachineConfig();

            config3.File = Guid.NewGuid().ToString();
            config3.Host = Guid.NewGuid().ToString();
            snapshot0.VirtualMachines.Add(config3);
            config2.Snapshots.Add(snapshot0);

            SnapshotConfig  snapshot1  = new SnapshotConfig();
            SnapshotsConfig snapshots1 = new SnapshotsConfig();

            snapshots1.Add(snapshot1);
            config3.Snapshots.Add(snapshot1);

            Assert.IsFalse(config1.Overlaps(config2));
            Assert.IsFalse(config2.Overlaps(config1));

            snapshot1.VirtualMachines.Add(config1);
            Assert.IsTrue(config1.Overlaps(config2));
            Assert.IsTrue(config2.Overlaps(config1));
        }