public void TestHealthStationWeighingAnother() { Person mannen = new Person("Master Blaster", 500, 3000, 300); HealthStation station = new HealthStation(); Assert.AreEqual(3000, station.Weigh(mannen), "Station.Weigh(Person) should return the weight of the person!"); }
public void TestHealthStationWeighing() { Person mannen = new Person("Superman", 35, 200, 300); HealthStation station = new HealthStation(); Assert.AreEqual(200, station.Weigh(mannen), "Station.Weigh(Person) should return the weight of the person!"); }
/// <summary> /// add healthstations as the invoker for the health change event /// </summary> /// <param name="invoker"></param> public static void AddPlayerHealthChangeInvoker(HealthStation invoker) { playerHealthChangedInvokers.Add(invoker); foreach (UnityAction <int> listener in PlayerHealthChanedListeners) { invoker.AddPlayerHealthChangeListener(listener); } }
public void TestHealthStationFeeding() { Person mannen = new Person("Superman", 35, 200, 300); HealthStation station = new HealthStation(); station.Feed(mannen); Assert.AreEqual(201, station.Weigh(mannen), "Station.Feed(Person) should increase the weight of the person by one!"); }
public void TestHealthStationWeighingCounter() { Person mannen = new Person("Superman", 35, 200, 300); HealthStation station = new HealthStation(); station.Weigh(mannen); station.Weigh(mannen); station.Weigh(mannen); station.Weigh(mannen); Assert.AreEqual(4, station.weighings, "Station.Weigh(Person) should increase the weight and the 'int weighings' by one!"); }
public void TestHealthStationConstructor() { string code = ""; try { code = File.ReadAllText("HealthStation.cs"); } catch { Console.WriteLine("Your file is not there yet!"); } HealthStation station = new HealthStation(); Assert.AreEqual(station.GetType(), typeof(HealthStation), "The HealthStation should be of type HealthStation!"); }