Example #1
0
        public void Surfaces_CreateFloat32FromDataArraySizeDimensionOfZero_ThrowsException()
        {
            var systemComponents = Substitute.For <ISystemComponents>();
            var surfaceManager   = Substitute.For <IGpuSurfaceManager>();
            var properties       = Substitute.For <IStartupPropertiesCache>();

            ISurfaces surfaces = new Surfaces(properties, surfaceManager, systemComponents);

            Assert.Throws <Yak2DException>(() => { surfaces.CreateFloat32FromData(0, 10, new float[0]); });
        }
Example #2
0
        public void Surfaces_CreateFloat32FromDataNullData_ThrowsException()
        {
            var systemComponents = Substitute.For <ISystemComponents>();
            var surfaceManager   = Substitute.For <IGpuSurfaceManager>();
            var properties       = Substitute.For <IStartupPropertiesCache>();

            ISurfaces surfaces = new Surfaces(properties, surfaceManager, systemComponents);

            Assert.Throws <Yak2DException>(() => { surfaces.CreateFloat32FromData(10, 20, null); });
        }