Exemplo n.º 1
0
 public void SetUp()
 {
     PersonStore = new PersonStorage();
     george      = PersonStore.AddPerson("George", Gender.Male);
     mary        = PersonStore.AddPerson("Mary", Gender.Female);
     bob         = PersonStore.AddPerson("Bob", Gender.Male);
     sally       = PersonStore.AddPerson("Sally", Gender.Female);
     dave        = PersonStore.AddPerson("Dave", Gender.Male);
 }
Exemplo n.º 2
0
        public void SetUp()
        {
            storage = new PersonStorage();
            PersonDTO george = storage.AddPerson("George", Gender.Male);
            PersonDTO mary   = storage.AddPerson("Mary", Gender.Female);
            PersonDTO bob    = storage.AddPerson("Bob", Gender.Male);
            PersonDTO sally  = storage.AddPerson("Sally", Gender.Female);

            familyGraph = new FamilyGraph(storage);
        }
Exemplo n.º 3
0
 private static void LoadPeople()
 {
     using (var reader = new StreamReader(Path.Combine("InputFiles", "Peeps.txt")))
     {
         while (!reader.EndOfStream)
         {
             var    line   = reader.ReadLine();
             var    values = line.Split(',').Select(m => m.Trim()).ToList();
             Gender gender = values[1].ToGender();
             personStorage.AddPerson(values[0], gender);
         }
     }
 }