Ejemplo n.º 1
0
        public void TestGetVersion()
        {
            var    pp     = new TestLogPlugin();
            Action action = () => pp.Version.ToString();

            action.Should().NotThrow();
        }
Ejemplo n.º 2
0
        public void TestLog()
        {
            var lp = new TestLogPlugin();

            lp.LogMessage("Hello");
            lp.Output.Should().Be("Plugin:TestLogPlugin_Info_Hello");
        }
Ejemplo n.º 3
0
        public void TestGetConfigFile()
        {
            var pp   = new TestLogPlugin();
            var file = pp.ConfigFile;

            file.EndsWith("config.json").Should().BeTrue();
        }
Ejemplo n.º 4
0
        public void TestNotifyPluginsLoadedAfterSystemConstructed()
        {
            var    pp     = new TestLogPlugin();
            Action action = () => Plugin.NotifyPluginsLoadedAfterSystemConstructed();

            action.Should().NotThrow();
        }
Ejemplo n.º 5
0
 public void TestResumeNodeStartupAndSuspendNodeStartup()
 {
     TestLogPlugin.TestLoadPlugins(TestBlockchain.TheNeoSystem);
     TestLogPlugin.TestSuspendNodeStartup();
     TestLogPlugin.TestSuspendNodeStartup();
     TestLogPlugin.TestResumeNodeStartup().Should().BeFalse();
     TestLogPlugin.TestResumeNodeStartup().Should().BeTrue();
 }
Ejemplo n.º 6
0
        public void TestResumeNodeStartupAndSuspendNodeStartup()
        {
            var system = TestBlockchain.InitializeMockNeoSystem();

            TestLogPlugin.TestLoadPlugins(system);
            TestLogPlugin.TestSuspendNodeStartup();
            TestLogPlugin.TestSuspendNodeStartup();
            TestLogPlugin.TestResumeNodeStartup().Should().BeFalse();
            TestLogPlugin.TestResumeNodeStartup().Should().BeTrue();
        }
Ejemplo n.º 7
0
        public void TestSendMessage()
        {
            lock (locker)
            {
                Plugin.Plugins.Clear();
                Plugin.SendMessage("hey1").Should().BeFalse();

                var lp = new TestLogPlugin();
                Plugin.SendMessage("hey2").Should().BeTrue();
            }
        }
Ejemplo n.º 8
0
        public void TestGetConfiguration()
        {
            var pp = new TestLogPlugin();

            pp.TestGetConfiguration().Key.Should().Be("PluginConfiguration");
        }
Ejemplo n.º 9
0
        public void TestGetName()
        {
            var pp = new TestLogPlugin();

            pp.Name.Should().Be("TestLogPlugin");
        }