public void AddNew() { var routines = new List <Finalizable>(); var routine = new Finalizable(); var stacking = new IntensityStacking(); stacking.Add(routine, routines, _ => { }); CollectionAssert.AreEqual(new Finalizable[] { routine }, routines); }
public void AddNewOnAdd() { var called = default(Finalizable); var routines = new List <Finalizable>(); var routine = new Finalizable(); var stacking = new IntensityStacking(); stacking.Add(routine, routines, a => called = a); Assert.AreSame(routine, called); }