public void TestLoginEmployeeMissingUserAndPass() { //Arrange string username = ""; string pass = ""; bool verified = false; using (PersonService.PersonServiceClient proxy = new PersonService.PersonServiceClient()) { //act verified = proxy.LogOn(username, pass); } //assert Assert.IsFalse(verified); }
public void TestLoginCustomerMissingEmailAndPass() { //Arrange string username = ""; string pass = ""; Customer customer = new Customer();; using (PersonService.PersonServiceClient proxy = new PersonService.PersonServiceClient()) { //Act customer = proxy.LoginCustomer(username, pass); } //Assert Assert.IsNull(customer); }
public void TestLoginCustomerMissingPass() { //arrenge string email = "*****@*****.**"; string pass = ""; Customer customer = new Customer(); using (PersonService.PersonServiceClient proxy = new PersonService.PersonServiceClient()) { //act customer = proxy.LoginCustomer(email, pass); } //assert Assert.IsNull(customer); }
public void TestLoginCustomerMissingEmail() { //arrenge string email = ""; string pass = "******"; Customer customer = new Customer(); using (PersonService.PersonServiceClient proxy = new PersonService.PersonServiceClient()) { //act customer = proxy.LoginCustomer(email, pass); } //assert Assert.IsNull(customer); }
public void TestLoginEmployeeSuccesful() { //arrange string username = "******"; string pass = "******"; bool verified = false; using (PersonService.PersonServiceClient proxy = new PersonService.PersonServiceClient()) { //act verified = proxy.LogOn(username, pass); } //assert Assert.IsTrue(verified); }
public void TestInsertCustomerSucces() { Customer c = new Customer(); c.Email = "*****@*****.**"; //If it fails try another mail c.Password = "******"; c.FName = "Jeppe"; c.LName = "Larsen"; c.PhoneNo = "45454545"; using (PersonService.PersonServiceClient proxy = new PersonService.PersonServiceClient()) { c = proxy.InsertCustomer(c); } Assert.IsNotNull(c); }
public void TestInsertResWithNoSeats() { //Arrange Reservation res = new Reservation(); res.Seats = new List <Seat>(); res.MovieId = 1; res.CustomerId = 1; bool verified = false; using (PersonService.PersonServiceClient proxy = new PersonService.PersonServiceClient()) { //Act verified = proxy.InsertReservation(res); } //Assert Assert.IsFalse(verified); }
public void TestInsertResSuccess() { //Arrange Reservation res = new Reservation(); res.Seats = new List <Seat>(); res.MovieId = 1; res.CustomerId = 1; Seat s = new Seat(); s.SeatId = 56; //Open the program and choose a free seat before running the test res.Seats.Add(s); bool verified = false; using (PersonService.PersonServiceClient proxy = new PersonService.PersonServiceClient()) { //Act verified = proxy.InsertReservation(res); } //Assert Assert.IsTrue(verified); }
public void TestInsertResWithBookedSeat() { //Arrange Reservation res = new Reservation(); res.Seats = new List <Seat>(); res.MovieId = 1; res.CustomerId = 1; Seat s = new Seat(); s.SeatId = 1; res.Seats.Add(s); bool verified = false; using (PersonService.PersonServiceClient proxy = new PersonService.PersonServiceClient()) { //Act verified = proxy.InsertReservation(res); } //Assert Debug.WriteLine("verified: " + verified); Assert.IsFalse(verified); }