Esempio n. 1
0
 public Person(Restaurant restaurant, string firstName, string lastName, string contactNumber, string email)
 {
     this.Restaurant = restaurant;
     this.FirstName = firstName;
     this.LastName = lastName;
     this.Email = email;
     this.ContactNumber = contactNumber;
 }
Esempio n. 2
0
 public void addEmployee()
 {
     string expectedFirstName = "Jungeun";
     string expectedLasttName = "Kim";
     string expectedPhone = "0412345678";
     string expectedMail = "*****@*****.**";
     Restaurant r = new Restaurant();
     Person e = r.AddEmployee(expectedFirstName, expectedLasttName, expectedPhone, expectedMail);
     Assert.AreEqual(expectedFirstName, e.FirstName);
     Assert.AreEqual(expectedLasttName, e.LastName);
     Assert.AreEqual(expectedPhone, e.ContactNumber);
     Assert.AreEqual(expectedMail, e.Email);
 }
Esempio n. 3
0
 public Menu(Restaurant restaurant)
 {
     this.Restaurant = restaurant;
 }
Esempio n. 4
0
 public Employee(Restaurant restaurant, string firstName, string lastName, string phoneNumber, string email)
     : base(restaurant, firstName, lastName, phoneNumber, email)
 {
 }
Esempio n. 5
0
 public Area(Restaurant restaurant, string description)
 {
     this.Restaurant = restaurant;
     this.Description = description;
     this.StateId = 1;
 }
Esempio n. 6
0
 public void addRetaurant()
 {
     string name = "Bean Scene";
     Restaurant r = new Restaurant { Name = name };
     Assert.AreEqual(name, r.Name);
 }
Esempio n. 7
0
        public void uniqueAreaNameTest()
        {
            Restaurant r = new Restaurant { Name = "BeanScene" };
            try
            {
                Area a1 = r.AddArea("MainFloor");
                Area a2 = r.AddArea("MainFloor");

            }
            catch (BusinessRuleException b)
            {
                StringAssert.Contains(b.Message, r.uniqueAreaName);
                return;
            }
            Assert.Fail("No exception was thrown.");
        }
Esempio n. 8
0
 public void fetchPerson()
 {
     Restaurant r = new Restaurant();
     Person expectedPerson = r.AddEmployee("Jungeun", "Kim" ,"0412345678" , "*****@*****.**");
     Person FetchedPerson = r.FetchPerson(expectedPerson.Id);
     Assert.AreEqual(expectedPerson, FetchedPerson);
 }