public void DataPassStackRunPipeline()
        {
            var go     = new GameObject("Test");
            var layers = new DataLayer[] { MockObjects.CreateMockDataLayer(10, 10), MockObjects.CreateMockDataLayer(10, 10) };
            var passes = new BaseDataPass[] { MockObjects.CreateMockDataPass(go, layers, 5), MockObjects.CreateMockDataPass(go, layers, 10) };
            var stack  = go.AddComponent <DataPassStack>();

            stack.Passes = passes;
            stack.Run();

            foreach (BaseDataPass pass in passes)
            {
            }
        }
Beispiel #2
0
        public void DataLayerIsSetToConstantValue()
        {
            var data = MockObjects.CreateMockDataLayer(10, 10);

            var go   = new GameObject("Test");
            var pass = go.AddComponent <FillWithValueDataPass>();

            pass.Layers          = new DataLayer[] { data };
            pass.ValueToPopulate = 5;
            pass.Run();

            for (int x = 0; x < data.SizeX; x++)
            {
                for (int y = 0; y < data.SizeY; y++)
                {
                    Assert.That(data[x, y], Is.EqualTo(5));
                }
            }
        }