public void SetUp() { _checkAllStartupConditions = Substitute.For <ICheckAllStartupConditions>(); _activation = new Activation(); _activationHelper = Substitute.For <IActivationHelper>(); _activationHelper.Activation.Returns(_activation); _licenseServerHelper = Substitute.For <ILicenseServerHelper>(); _licenseChecker = Substitute.For <ILicenseChecker>(); _licenseServerHelper.BuildLicenseChecker(RegistryHive.LocalMachine) .Returns(_licenseChecker); _storeLicenseForAllUsersStart = new StoreLicenseForAllUsersStart(_checkAllStartupConditions, _activationHelper, _licenseServerHelper); }
public void SetUp() { _checkAllStartupConditions = Substitute.For <ICheckAllStartupConditions>(); _licenseServerString = "LSA"; _licenseKey = "MY-LICENSE-KEY"; _registry = Substitute.For <IRegistry>(); var pathProvider = Substitute.For <IInstallationPathProvider>(); pathProvider.ApplicationRegistryPath.Returns(RegistryPath); _storeLicenseForAllUsersStart = new StoreLicenseForAllUsersStart(_checkAllStartupConditions, _registry, pathProvider); _storeLicenseForAllUsersStart.LicenseServerCode = _licenseServerString; _storeLicenseForAllUsersStart.LicenseKey = _licenseKey; }