コード例 #1
0
        public override void SetUp()
        {
            base.SetUp();

            var bootstrapper = new AlfredBootstrapper();
            _alfred = bootstrapper.Create();

            _subsystem = new TestSubsystem(Container);
        }
コード例 #2
0
        public override void SetUp()
        {
            base.SetUp();

            _metricProviderFactory = new ValueMetricProviderFactory();
            _subsystem = new SystemMonitoringSubsystem(Container);

            var bootstrapper = new AlfredBootstrapper();
            _alfred = bootstrapper.Create();
        }
コード例 #3
0
        public override void SetUp()
        {
            base.SetUp();

            var bootstrapper = new AlfredBootstrapper();
            _alfred = bootstrapper.Create();
            _subsystem = new TestSubsystem(Container);
            _page = new TestPage(Container);

            _subsystem.AddAutoRegisterPage(_page);
            _alfred.Register(_subsystem);
        }
コード例 #4
0
        public void AtInitialStateInitializeIsVisible()
        {
            // Doing this again here to illustrate creation / configuration order more clearly
            var bootstrapper = new AlfredBootstrapper();
            _alfred = bootstrapper.Create();
            _module = new AlfredPowerModule(Container);

            RegisterTestModule(_alfred, _module);

            Assert.IsNotNull(_module.AlfredInstance, "Alfred was not set");
            Assert.IsTrue(_module.InitializeButton.IsVisible, "Initialize button was not visible while offline.");
            Assert.IsNotNull(_module.Widgets, "_module.Widgets was null");
            Assert.IsTrue(_module.Widgets.Contains(_module.InitializeButton),
                          "The Initialize button was not part of the UI while offline");
        }
コード例 #5
0
        public override void SetUp()
        {
            base.SetUp();

            var bootstrapper = new AlfredBootstrapper();
            _alfred = bootstrapper.Create();
            _alfred.Console = new SimpleConsole();

            _subsystem = new TestSubsystem(Container);
            _page = new AlfredModuleListPage(Container, "Test Page", "Test");
        }
コード例 #6
0
        public override void SetUp()
        {
            base.SetUp();

            var bootstrapper = new AlfredBootstrapper();
            _alfred = bootstrapper.Create();
            _module = new AlfredPowerModule(Container);

            RegisterTestModule(_alfred, _module);
        }
コード例 #7
0
        public void CoreModuleHasNoProviderText()
        {
            var bootstrapper = new AlfredBootstrapper(Container);
            _alfred = bootstrapper.Create();
            _module = new AlfredPowerModule(Container);

            var text = _module.AlfredStatusWidget.Text;
            Assert.IsNotNull(text, "Widget text was null");
            Assert.IsTrue(text.EndsWith("has not been set"),
                          $"Component did not indicate that Alfred was not set. Instead indicated: {text}");
        }
コード例 #8
0
        public void OnStartup()
        {
            var bootstrapper = new AlfredBootstrapper();
            _alfred = bootstrapper.Create();

            _page = new AlfredModuleListPage(Container, "Time", "Time");
            _module = new AlfredTimeModule(Container);
            _page.Register(_module);
            _subsystem = new TestSubsystem(Container);
            _subsystem.AddAutoRegisterPage(_page);

            _alfred.Register(_subsystem);
        }
コード例 #9
0
        public override void SetUp()
        {
            base.SetUp();

            var bootstrapper = new AlfredBootstrapper(Container);
            _alfred = bootstrapper.Create();

            _subsystem = new MindExplorerSubsystem(Container, true);

            _page = _subsystem.MindExplorerPage;
        }