public void InterventionInterveningTeamArrivedTest() { Team t = new Team("TestTeam"); Intervention a = new Intervention(); a.AddInterveningTeam(t); a.InterveningTeamArrived(t); TimeSpan ts = new TimeSpan(0); int threshold = 1; foreach (Resource r in a.getResourceList()) { if (r.getTeam().Equals(t)) { ts = DateTime.Now - r.getArrivalTime(); } } Assert.IsTrue(ts.TotalSeconds <= threshold); }