Пример #1
0
    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);
    }
Пример #2
0
    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);
    }