Exemple #1
0
        public void CheckPathsAreUnique_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.CheckPathsAreUnique());
        }
Exemple #2
0
        public void CheckPathsAreUnique_ShouldThrow()
        {
            var newInstance = new ServiceControlNewInstance
            {
                InstallPath = @"c:\test\1\bin",
                LogPath     = @"c:\test\1\bin",
                DBPath      = @"c:\test\1\bin"
            };

            var p = new PathsValidator(newInstance);

            var ex = Assert.Throws <EngineValidationException>(() => p.CheckPathsAreUnique());

            Assert.That(ex.Message, Is.EqualTo("The installation path, log path and database path must be unique"));
        }