async Task SetWibuManager(string version, int existingTeams, bool canExecute) { wibuManager = new LMDummyWibuManager(version); App.Current.LicenseManager = wibuManager; await App.Current.LicenseManager.Init(); // Exclude the static teams countLimitationVM.Count = existingTeams - 2; mockLimitationService.Setup(x => x.CanExecute(It.IsAny <string> ())).Returns(canExecute); }
public async Task HomeController_StartController_SetsCorrectIcon() { wibuManager = new LMDummyWibuManager(LMDummyWibuManager.STARTER_PRODUCT_TEXT); App.Current.LicenseManager = wibuManager; await App.Current.LicenseManager.Init(); await controller.Start(); Assert.AreEqual(Constants.LOGO_STARTER_ICON, App.Current.SoftwareIconName); }
public async Task LMLicenseLimitationsService_BasicPlanInitialized_DatabaseManagerLimitationEnabled() { wibuManager = new LMDummyWibuManager(LMDummyWibuManager.BASIC_PRODUCT_TEXT); App.Current.LicenseManager = wibuManager; await App.Current.LicenseManager.Init(); service = new LMLicenseLimitationsService(); var featureLimitation = service.Get <FeatureLimitationVM> (LongoMatchFeature.DatabaseManager.ToString()); Assert.IsNotNull(featureLimitation); Assert.AreEqual(LongoMatchFeature.DatabaseManager.ToString(), featureLimitation.RegisterName); Assert.IsTrue(featureLimitation.Enabled); }
public async Task LMLicenseLimitationsService_StarterPlanInitialized_ConversionLimitationDisabled() { wibuManager = new LMDummyWibuManager(LMDummyWibuManager.STARTER_PRODUCT_TEXT); App.Current.LicenseManager = wibuManager; await App.Current.LicenseManager.Init(); service = new LMLicenseLimitationsService(); var featureLimitation = service.Get <FeatureLimitationVM> (LongoMatchFeature.VideoConverter.ToString()); Assert.IsNotNull(featureLimitation); Assert.AreEqual(LongoMatchFeature.VideoConverter.ToString(), featureLimitation.RegisterName); Assert.IsFalse(featureLimitation.Enabled); }
public async Task HomeController_LicenseChangeEvent_ControllerChangesIcon() { wibuManager = new LMDummyWibuManager(""); App.Current.LicenseManager = wibuManager; await App.Current.LicenseManager.Init(); await controller.Start(); wibuManager = new LMDummyWibuManager(LMDummyWibuManager.PRO_PRODUCT_TEXT); App.Current.LicenseManager = wibuManager; await App.Current.LicenseManager.Init(); Assert.AreEqual(Constants.LOGO_ICON, App.Current.SoftwareIconName); await App.Current.EventsBroker.Publish(new LicenseChangeEvent()); Assert.AreEqual(Constants.LOGO_PRO_ICON, App.Current.SoftwareIconName); }
public async Task LMLicenseLimitationsService_LicenseChangeEventBasic_ConversionLimitationDisabled() { wibuManager = new LMDummyWibuManager(LMDummyWibuManager.PRO_PRODUCT_TEXT); App.Current.LicenseManager = wibuManager; await App.Current.LicenseManager.Init(); service = new LMLicenseLimitationsService(); service.Start(); var featureLimitation = service.Get <FeatureLimitationVM> (LongoMatchFeature.VideoConverter.ToString()); Assert.IsFalse(featureLimitation.Enabled); wibuManager = new LMDummyWibuManager(LMDummyWibuManager.BASIC_PRODUCT_TEXT); App.Current.LicenseManager = wibuManager; await App.Current.LicenseManager.Init(); await App.Current.EventsBroker.Publish(new LicenseChangeEvent()); Assert.IsTrue(featureLimitation.Enabled); service.Stop(); }