public void TestHelp() { SpreadsheetViewStub stub = new SpreadsheetViewStub(); Controller controller = new Controller(stub); stub.FireHelpEvent(); Assert.AreEqual(stub.Message, "Turorial:\n\n" + "Update Cells:\n" + "To update the value of a cell, click on it and put in the desired value into the formula textbox, then " + "push the button marked \"Update\". Note: an asterix (*) will appear next to the file name in the window " + "header if ther are any unsaved changes. You can put text or numbers into the cell. To put in a formula " + "that uses other cells, type an equals sign (=) into the formula textbox and then type in your formula. " + "Then tap \"Update\". Any dependent cells in the spreadsheet will be automatically updated. The value " + "of your selected cell will be displayed in the textbox labeled \"Value\". \n\n" + "New Window:\n" + "To open a new window click \"New\" in the help menu. \n\n" + "Open Spreadsheet:\n" + "To open an ss file, click \"Open\" in the file menu and choose your file. \n\n" + "Save Spreadsheet:\n" + "To save a spreadsheet, click \"Save\" then give your file a name, then click ok. You may overwrite existing " + "files if you wish. \n\n" + "Close Spreadsheet:\n" + "To close the spreadsheet, click \"Close\" in the file menu or click on the exit button on the window. If there " + "are any unsaved changes, the spreadsheet will prompt you to either save, not save, or cancel close operation."); }
public void TestHelpName() { SpreadsheetViewStub stub = new SpreadsheetViewStub(); stub.spreadSheetPanel = new SpreadsheetPanel(); Controller controller = new Controller(stub); stub.FireHelpEvent(); Assert.IsTrue(stub.Message.Equals("Click on a cell to select it.\nEnter desired contents of cell into \"Contents\" box and press enter to apply.")); }