/// <summary> /// Sends the RoomType to the manager /// </summary> private void btnCreate_Click(object sender, RoutedEventArgs e) { createNewEmpRole(); if (result == true) { try { result = roomManager.CreateRoomType(_RoomType); if (result == true) { this.DialogResult = true; } } catch (Exception ex) { MessageBox.Show(ex.Message, "Adding Room Type Failed."); } } }
public void TestCreateRoomTypeValidInput() { bool expectedResult = true; bool actualResult; // arrange RoomType testRoomType = new RoomType() { RoomTypeID = "GoodID", Description = "Good Description", }; // act actualResult = roomTypeManager.CreateRoomType(testRoomType); // assert - check if RoomType was added Assert.AreEqual(expectedResult, actualResult); }