public void Test_ClubsManager_GetClubByRegNumMethod() { ClubsManager clubMg3 = new ClubsManager(); Club club2 = new Club(2000, "CCAC", new Address("35 River St", "Toronto", "ON", "M2M 5M5"), 4165555555); clubMg3.Add(club2); Club clubCheck = clubMg3.GetByRegNum(2000); Assert.AreEqual(club2, clubCheck); }
public void ClubManager_GetClubByInvalidNum_Output() { ClubsManager clbMng = new ClubsManager(); Club club = new Club(); clbMng.Add(club); Club newClub = clbMng.GetByRegNum(0); Assert.AreEqual(newClub, null); }
public void ClubManager_GetClubByRegNum_Success() { ClubsManager clbMng = new ClubsManager(); Club club = new Club(); clbMng.Add(club); Club newClub = clbMng.GetByRegNum(club.ClubNumber); Assert.AreEqual(club, newClub); }
public void Get_Non_Existant_Club() { // arrange Club expectedResult = null; ClubsManager aClubManager = new ClubsManager(); // act Club actual = aClubManager.GetByRegNum(0); // assert Assert.AreEqual(expectedResult, actual, "Get Club fail"); }
public void GetByRegNoWorkingProperly() { //arrange ClubsManager aClubManager = new ClubsManager(); Address aAddress = new Address(); Club aClub = new Club(118, "my club", aAddress, 1234567890); //act aClubManager.Add(aClub); Club expected = aClub; //assert Club actual = aClubManager.GetByRegNum(118); Assert.AreEqual(expected, actual); }