Beispiel #1
0
 private void SetupControllers(LicenseManagerController lmcontroller)
 {
     checkableDataGridView.Controller = new LicenseCheckableDataGridViewController(checkableDataGridView);
     summaryPanel.Controller          = new SummaryPanelController(summaryPanel);
     checkableDataGridView.LoadView();
     Controller      = lmcontroller;
     Controller.View = this;
 }
Beispiel #2
0
 private void SetupControllers(LicenseManagerController lmcontroller)
 {
     checkableDataGridView.Controller = new LicenseCheckableDataGridViewController(checkableDataGridView);
     summaryPanel.Controller = new SummaryPanelController(summaryPanel);
     checkableDataGridView.LoadView();
     Controller = lmcontroller;
     Controller.View = this;
 }
Beispiel #3
0
 private void SetupControllers(LicenseManagerController lmcontroller)
 {
     checkableDataGridView.Controller = new LicenseCheckableDataGridViewController(checkableDataGridView);
     summaryPanel.Controller          = new SummaryPanelController(summaryPanel);
     checkableDataGridView.LoadView();
     Controller      = lmcontroller;
     Controller.View = this;
     downloadLicenseServerLink.Visible = checkBoxColumn.Visible = !Controller.ReadOnlyView;
 }
Beispiel #4
0
 private void SetupControllers(LicenseManagerController lmcontroller)
 {
     checkableDataGridView.Controller = new LicenseCheckableDataGridViewController(checkableDataGridView);
     summaryPanel.Controller = new SummaryPanelController(summaryPanel);
     checkableDataGridView.LoadView();
     Controller = lmcontroller;
     Controller.View = this;
     downloadLicenseServerLink.Visible = checkBoxColumn.Visible = !Controller.ReadOnlyView;
 }
Beispiel #5
0
 public void ButtonEnablementForNoSelection()
 {
     LicenseManagerController licenseSummary = new LicenseManagerController(view.Object);
     view.Setup(v => v.GetCheckedRows).Returns(new List<CheckableDataGridViewRow>());
     licenseSummary.UpdateButtonEnablement();
     view.Verify(v => v.DrawActivateButtonAsDisabled(true));
     view.Verify(v => v.DrawAssignButtonAsDisabled(true));
     view.Verify(v => v.DrawReleaseButtonAsDisabled(true));
     view.Verify(v => v.DrawActivateButtonAsHidden(false));
 }
        public void ButtonEnablementForFailingVerifier()
        {
            LicenseManagerController licenseSummary = new LicenseManagerController(view.Object)
            {
                VerifierFactory = new BlanketResponseSelectionVerifierFactory(new AllNotOkVerifier()),
                ActivationRequest = activation.Object
            };

            view.Setup(v => v.GetCheckedRows).Returns(CreateList(new TestCase
            {
                MockType = ObjectBuilderType.BostonHost,
                License = Host.Edition.Free
            }));

            licenseSummary.UpdateButtonEnablement();
            view.Verify(v => v.DrawActivateButtonAsDisabled(true));
            view.Verify(v => v.DrawAssignButtonAsDisabled(true));
            view.Verify(v => v.DrawReleaseButtonAsDisabled(true));
            view.Verify(v => v.DrawActivateButtonAsHidden(false));
        }
 public LicenseManager(LicenseManagerController lmcontroller)
 {
     InitializeComponent();
     SetupControllers(lmcontroller);
 }
        public void ButtonEnablementForLicensedClearwaterSelection()
        {
            LicenseManagerController licenseSummary = new LicenseManagerController(view.Object)
            {
                VerifierFactory = new BlanketResponseSelectionVerifierFactory(new AllOkVerifier()),
                ActivationRequest = activation.Object
            };

            activation.Setup(a => a.AllHostsCanBeActivated).Returns(true);
            view.Setup(v => v.GetCheckedRows).Returns(CreateList(new TestCase {
                                                                        MockType = ObjectBuilderType.ClearwaterHost,
                                                                        License = Host.Edition.PerSocket}));

            licenseSummary.UpdateButtonEnablement();
            view.Verify(v => v.DrawAssignButtonAsDisabled(false));
            view.Verify(v => v.DrawReleaseButtonAsDisabled(false));
            view.Verify(v => v.DrawActivateButtonAsHidden(true));
            view.Verify(v => v.DrawApplyButtonAsDisabled(false));
            view.Verify(v => v.DrawRequestButtonAsDisabled(false));
            view.Verify(v => v.DrawActivateButtonAsDisabled(false));
        }
Beispiel #9
0
 public LicenseManager(LicenseManagerController lmcontroller)
 {
     InitializeComponent();
     SetupControllers(lmcontroller);
 }
Beispiel #10
0
        public void ButtonEnablementForUnactivatableHosts()
        {
            LicenseManagerController licenseSummary = new LicenseManagerController(view.Object)
            {
                VerifierFactory = new BlanketResponseSelectionVerifierFactory(new AllOkVerifier()),
                ActivationRequest = activation.Object
            };

            activation.Setup(a => a.AllHostsCanBeActivated).Returns(false);
            activation.Setup(a => a.HostsThatCanBeActivated).Returns(() => new List<Host>().AsReadOnly());
            view.Setup(v => v.GetCheckedRows).Returns(CreateList(new TestCase
            {
                MockType = ObjectBuilderType.RioHost,
                License = Host.Edition.Free
            }));

            licenseSummary.UpdateButtonEnablement();
            view.Verify(v => v.DrawAssignButtonAsDisabled(false));
            view.Verify(v => v.DrawReleaseButtonAsDisabled(true));
            view.Verify(v => v.DrawActivateButtonAsHidden(true));
            view.Verify(v => v.DrawApplyButtonAsDisabled(true, null));
            view.Verify(v => v.DrawRequestButtonAsDisabled(true));
            view.Verify(v => v.DrawActivateButtonAsDisabled(true));
        }
Beispiel #11
0
 public LicenseManager(LicenseManagerController lmcontroller)
 {
     InitializeComponent();
     checkableDataGridView.StatusImageColumn = statusImageColumn;
     SetupControllers(lmcontroller);
 }