Exemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldDescribeUpgradeFailureInAFriendlyWay()
        public virtual void ShouldDescribeUpgradeFailureInAFriendlyWay()
        {
            // given
            AssertableLogProvider logging = new AssertableLogProvider();
            LifecycleException    error   = new LifecycleException(new object(), STARTING, STARTED, new Exception("Error starting org.neo4j.kernel.ha.factory.EnterpriseFacadeFactory", new LifecycleException(new object(), STARTING, STARTED, new LifecycleException(new object(), STARTING, STARTED, new UpgradeNotAllowedByConfigurationException()))));

            // when
            translateToServerStartupError(error).describeTo(logging.GetLog("console"));

            // then
            logging.AssertExactly(inLog("console").error("Neo4j cannot be started because the database files require upgrading and upgrades are disabled " + "in the configuration. Please set '" + GraphDatabaseSettings.allow_upgrade.name() + "' to 'true' " + "in your configuration file and try again."));
        }
Exemplo n.º 2
0
        public void TestState()
        {
            var e = new LifecycleException(Lifecycle.Status.Offline);

            e.Status.ShouldBe(Lifecycle.Status.Offline);
        }
Exemplo n.º 3
0
        public void TestMessage()
        {
            var e = new LifecycleException(Lifecycle.Status.Offline);

            e.Message.ShouldBe($"Invalid status 'offline'");
        }