public void GetNonExistingLandlordData() { CtrLandlord ctrLandlordObj = new CtrLandlord(); MdlLandlord mdlLandlordObj = ctrLandlordObj.GetLandlordData("*****@*****.**"); Assert.IsNull(mdlLandlordObj.ContactPerson); }
public string AddLandlord(MdlLandlord mdlLandlordObj) { ctrLandlordObj = new CtrLandlord(); Console.WriteLine(); Console.WriteLine("AddLandlord() " + GetExecutionThreadTime()); return(ctrLandlordObj.AddLandlord(mdlLandlordObj)); }
public DataSet GetFlatsLandlord(string landlordEmail) { ctrLandlordObj = new CtrLandlord(); Console.WriteLine(); Console.WriteLine("GetFlatsLandlord() " + GetExecutionThreadTime()); return(ctrLandlordObj.GetFlatsLandlord(landlordEmail)); }
public bool EditLandlordProfile(MdlLandlord mdlLandlordObj) { ctrLandlordObj = new CtrLandlord(); Console.WriteLine(); Console.WriteLine("EditLandlordProfile() " + GetExecutionThreadTime()); return(ctrLandlordObj.UpdateProfile(mdlLandlordObj)); }
public MdlLandlord GetLandlordData(string email) { ctrLandlordObj = new CtrLandlord(); Console.WriteLine(); Console.WriteLine("GetLandlordData() " + GetExecutionThreadTime()); return(ctrLandlordObj.GetLandlordData(email)); }
public void AddNewLandlord() { CtrLandlord ctrLandlordObj = new CtrLandlord(); MdlLandlord mdlLandlordObj = GenerateLandlordObj(); string expected = "Registration successful."; string actual; actual = ctrLandlordObj.AddLandlord(mdlLandlordObj).Trim(); Assert.AreEqual(expected, actual); }
public void AddFlat() { CtrLandlord ctrLandlordObj = new CtrLandlord(); MdlFlat mdlFlatObj = GenerateFlatObj(); string expected = "Successfully added."; string actual; actual = ctrLandlordObj.AddFlat(mdlFlatObj.LandlordEmail, mdlFlatObj.Type, mdlFlatObj.Address, mdlFlatObj.PostCode, mdlFlatObj.City, mdlFlatObj.Rent, mdlFlatObj.Deposit, mdlFlatObj.AvailableFrom, mdlFlatObj.Description).Trim(); Assert.AreEqual(expected, actual); }
public string AddFlat(string landLordEmail, string type, string address, string postCode, string city, double rent, double deposit, string availableFrom, string description) { ctrLandlordObj = new CtrLandlord(); Console.WriteLine(); Console.WriteLine("AddFlat() " + GetExecutionThreadTime()); return(ctrLandlordObj.AddFlat(landLordEmail, type, address, postCode, city, rent, deposit, availableFrom, description)); }
public void GetLandlordData() { string expected = "contactPerson"; string actual; CtrLandlord ctrLandlordObj = new CtrLandlord(); MdlLandlord mdlLandlordObj = ctrLandlordObj.GetLandlordData("*****@*****.**"); actual = mdlLandlordObj.ContactPerson.Trim(); Assert.AreEqual(expected, actual); }
public void AddExistingLandlord() { CtrLandlord ctrLandlordObj = new CtrLandlord(); MdlLandlord mdlLandlordObj = GenerateLandlordObj(); mdlLandlordObj.Email = "*****@*****.**"; string expected = "Registration has failed due to the existing Email."; string actual; actual = ctrLandlordObj.AddLandlord(mdlLandlordObj).Trim(); Assert.AreEqual(expected, actual); }
public void AddFlatStudentEmail() { CtrLandlord ctrLandlordObj = new CtrLandlord(); MdlFlat mdlFlatObj = GenerateFlatObj(); mdlFlatObj.LandlordEmail = "*****@*****.**"; string expected = "Unable to add flat due to nonexisting landlord email."; string actual; actual = ctrLandlordObj.AddFlat(mdlFlatObj.LandlordEmail, mdlFlatObj.Type, mdlFlatObj.Address, mdlFlatObj.PostCode, mdlFlatObj.City, mdlFlatObj.Rent, mdlFlatObj.Deposit, mdlFlatObj.AvailableFrom, mdlFlatObj.Description).Trim(); Assert.AreEqual(expected, actual); }
public void UpdateLandlordProfileNonExistingEmail() { CtrLandlord ctrLandlordObj = new CtrLandlord(); MdlLandlord mdlLandlordObj = GenerateLandlordObj(); mdlLandlordObj.Email = "*****@*****.**"; mdlLandlordObj.Name = "CompanyName"; mdlLandlordObj.Country = "Slovakia"; mdlLandlordObj.City = "Neslusa"; mdlLandlordObj.PostCode = "02341"; mdlLandlordObj.Address = "Neslusa 523"; mdlLandlordObj.ContactPerson = "Miroslav Pakanec"; bool expected = false; bool actual = ctrLandlordObj.UpdateProfile(mdlLandlordObj); Assert.AreEqual(expected, actual); }
public void ConfirmTenants() { CtrConfirmed ctrConfirmedObj = new CtrConfirmed(); FlatTestes flatTestsObj = new FlatTestes(); CtrFlat ctrFlatObj = new CtrFlat(); MdlFlat mdlFlatObj = flatTestsObj.GenerateFlatObj(); mdlFlatObj.Id = flatTestsObj.GetFlatId(mdlFlatObj); mdlFlatObj.DateOfOffer = "None"; CtrLandlord ctrLandlordObj = new CtrLandlord(); string output = ctrLandlordObj.AddFlat(mdlFlatObj.LandlordEmail, mdlFlatObj.Type, mdlFlatObj.Address, mdlFlatObj.PostCode, mdlFlatObj.City, mdlFlatObj.Rent, mdlFlatObj.Deposit, mdlFlatObj.AvailableFrom, mdlFlatObj.Description).Trim(); bool expected = true; bool actual = ctrConfirmedObj.ConfirmTenants(mdlFlatObj.Id, "*****@*****.**"); Assert.AreEqual(expected, actual); }