Exemple #1
0
        public void have_exactly_one_name_attribute()
        {
            var person = new PersonElement(null);
            var writer = XmlWriter.Create(new MemoryStream());

            Assert.Throws <AtomSpecificationViolationException>(() => person.WriteXml(writer));
            writer.Close();
        }
    public void Prime()
    {
        repo = GetComponent <PersonRepository>();
        foreach (Transform child in personList.transform)
        {
            GameObject.Destroy(child.gameObject);
        }

        foreach (KeyValuePair <int, Person> person in repo.People)
        {
            PersonElement element = (PersonElement)Instantiate(prefab);
            element.PrimeButton(person.Value);
            element.transform.SetParent(personList, false);
        }
    }
Exemple #3
0
 public void UpdatePeople()
 {
     foreach (Transform child in PeopleOnTrip.transform)
     {
         GameObject.Destroy(child.gameObject);
     }
     if (Trip != null)
     {
         foreach (KeyValuePair <int, Person> person in Trip.PeopleOnTrip)
         {
             PersonElement element = (PersonElement)Instantiate(PersonElementPrefab);
             element.PrimeButton(person.Value);
             element.transform.SetParent(PeopleOnTrip, false);
         }
     }
 }