public void Test_ProfileCell_ClearLayers() { ProfileCell cell = new ProfileCell(); cell.AddLayer(new FilteredMultiplePassInfo(new[] { new FilteredPassData() })); cell.ClearLayers(); Assert.True(cell.IsEmpty(), "Cell layers not empty after clear layers"); }
public void Test_ProfileCell_IsEmpty() { ProfileCell cell = new ProfileCell(); Assert.True(cell.IsEmpty(), "Cell not empty after construction"); cell.AddLayer(new FilteredMultiplePassInfo(new[] { new FilteredPassData() })); Assert.False(cell.IsEmpty(), "Cell empty after addition of a layer"); cell.ClearLayers(); Assert.True(cell.IsEmpty(), "Cell layers not empty after clear layers"); }
public void Test_ProfileCell_RequestNewLayer() { ProfileCell cell = new ProfileCell(); IProfileLayer layer = cell.RequestNewLayer(out int RecycledIndex); cell.Layers.Add(layer, RecycledIndex); Assert.True(layer != null, "RequestNewLayer did not return a new layer"); Assert.True(-1 == RecycledIndex, "Recycled index not -1 for new layer with no recyclbles available"); cell.ClearLayers(); layer = cell.RequestNewLayer(out RecycledIndex); Assert.True(layer != null, "RequestNewLayer did not return a new layer after recycling previous layer"); Assert.True(0 == RecycledIndex, "Recycled index not 0 for new layer with one recyclable available"); }