public void Setup() { updateServer = MockRepository.GenerateStub<IUpdateServer>(); localStructureManager = MockRepository.GenerateStub<ILocalStructureManager>(); var updaterChef = MockRepository.GenerateStub<IUpdaterChef>(); updateManager = new UpdateManager(updateServer, localStructureManager, updaterChef); }
public void Setup() { updateServer = MockRepository.GenerateStub<IUpdateServer>(); localStructureManager = MockRepository.GenerateStub<ILocalStructureManager>(); updaterChef = MockRepository.GenerateStub<IUpdaterChef>(); updateManager = new UpdateManager(updateServer, localStructureManager, updaterChef); initialVersion = "1.2.3"; installedVersions = new string[] { "1.0.0", "1.1.1", "1.2.3" }; localStructureManager.Stub(x => x.GetCurrentVersion()).Return(initialVersion); localStructureManager.Stub(x => x.GetExecutingVersion()).Return(initialVersion); localStructureManager.Stub(x => x.GetInstalledVersions()).Do(new Func<string[]>(()=>installedVersions)); updateManager.Initialize(); }
public void Setup() { localStructureManager = MockRepository.GenerateStub<ILocalStructureManager>(); updateServer = MockRepository.GenerateStub<IUpdateServer>(); updaterChef = new UpdaterChef(localStructureManager, updateServer); }
public UpdateManager(IUpdateServer updateServer, ILocalStructureManager localStructureManager, IUpdaterChef updaterChef) { this.updateServer = updateServer; this.localStructureManager = localStructureManager; this.updaterChef = updaterChef; }
public UpdaterChef(ILocalStructureManager localStructureManager, IUpdateServer updateServer) { this.localStructureManager = localStructureManager; this.updateServer = updateServer; }