Inheritance: IVaporEntity
Exemplo n.º 1
0
        public void GivenJackAndJillAreAtTheBottomOfTheHill()
        {
            var peopleRepo = RecallAidHelper.GetReal<PeopleRepo>();

            var jack = new Person()
                {
                    FirstName = "Jack",
                    Address = "Bottom of Hill"
                };

            var jill = new Person()
            {
                FirstName = "Jill",
                Address = "Bottom of Hill"
            };

            peopleRepo.Save(jack);
            peopleRepo.Save(jill);

            ScenarioContext.Current.Add("JackId", jack.Id);
            ScenarioContext.Current.Add("JillId", jill.Id);
        }
Exemplo n.º 2
0
        public void GivenIHavePeople(Table table)
        {
            var peopleRepo = RecallAidHelper.GetReal<PeopleRepo>();
            var storeRepo = RecallAidHelper.GetReal<StoreRepo>();

            foreach (var tableRow in table.Rows)
            {
                var localTableRow = tableRow;

                var newPerson = new Person();

                newPerson.EmpId = tableRow["Emp Id"];
                newPerson.FirstName = tableRow["First Name"];
                newPerson.MiddleName = tableRow["Middle Name"];
                newPerson.LastName = tableRow["Last Name"];
                newPerson.YearsOfService = int.Parse(tableRow["Years Of Service"]);

                var store = storeRepo.GetById(localTableRow["Store Id"]);

                newPerson.Store = store;

                peopleRepo.Save(newPerson);
            }
        }