Exemplo n.º 1
0
        public void CheckNoNestedPaths_ShouldSucceed()
        {
            var newInstance = new ServiceControlNewInstance
            {
                InstallPath = @"c:\test\1\bin",
                LogPath     = @"c:\test\1\log",
                DBPath      = @"c:\test\1\db"
            };

            var p = new PathsValidator(newInstance);

            Assert.DoesNotThrow(() => p.CheckNoNestedPaths());
        }
Exemplo n.º 2
0
        public void CheckNoNestedPaths_ShouldThrow()
        {
            var newInstance = new ServiceControlNewInstance
            {
                InstallPath = @"c:\test\1",
                LogPath     = @"c:\test\1\log",
                DBPath      = @"c:\test\1\db"
            };

            var p  = new PathsValidator(newInstance);
            var ex = Assert.Throws <EngineValidationException>(() => p.CheckNoNestedPaths());

            Assert.That(ex.Message, Does.Contain("Nested paths are not supported"));
        }
Exemplo n.º 3
0
        public void CheckNoNestedSiblingPaths_ShouldSucceed()
        {
            var newInstance = new ServiceControlInstanceMetadata
            {
                InstallPath = @"c:\test\1\servicecontrol",
                LogPath     = @"c:\test\1\servicecontrollog",
                DBPath      = @"c:\test\1\servicecontroldb"
            };

            var p = new PathsValidator(newInstance)
            {
                Instances = instances
            };

            Assert.DoesNotThrow(() => p.CheckNoNestedPaths());
        }