public void SaveWorkspaceAtShutdown() { IWorkspaceStorage workspaceStorage = MockRepository.GenerateMock <IWorkspaceStorage>(); StumpApplication app = new StumpApplication(workspaceStorage); workspaceStorage.Expect(ws => ws.SaveWorkspace(app.Workspace)); app.Shutdown(); workspaceStorage.VerifyAllExpectations(); }
public void LoadWorkspaceAtStartup() { IWorkspaceStorage workspaceStorage = MockRepository.GenerateMock <IWorkspaceStorage>(); Workspace workspace = new Workspace(); workspaceStorage.Expect(ws => ws.LoadWorkspace()).Return(workspace); StumpApplication app = new StumpApplication(workspaceStorage); app.Start(); Assert.IsNotNull(app.Workspace); workspaceStorage.VerifyAllExpectations(); }