/// <summary> /// Sends the guestType to the manager /// </summary> private void btnCreate_Click(object sender, RoutedEventArgs e) { createNewEmpRole(); if (result == true) { try { result = guestManager.CreateGuestType(_guestType); if (result == true) { this.DialogResult = true; } } catch (Exception ex) { MessageBox.Show(ex.Message, "Adding Guest Type Failed."); } } }
public void TestCreateGuestTypeValidInput() { bool expectedResult = true; bool actualResult; // arrange GuestType testGuestType = new GuestType() { GuestTypeID = "GoodID", Description = "Good Description", }; // act actualResult = guestManager.CreateGuestType(testGuestType); // assert - check if GuestType was added Assert.AreEqual(expectedResult, actualResult); }