Beispiel #1
0
        public void Window_CreationFailTest()
        {
            Window window = new Window("Invalid width", -100, 300);
            Assert.AreEqual(false, window.Created);

            window = new Window("Invalid height", 100, -300);
            Assert.AreEqual(false, window.Created);
        }
Beispiel #2
0
 internal static Device GetDevice()
 {
     if (device == null)
     {
         Window window = new Window("TestHelpers.GetDevice", 640, 480);
         device = new Device(window.Handle, window.Width, window.Height);
     }
     return device;
 }
Beispiel #3
0
        public void Framework_Constructor_Test()
        {
            var window = new Window("FrameworkTest", 640, 480);
            Framework fw = new Framework(window.Handle, window.Width, window.Height, RenderSettings.MediaPath);

            Assert.IsNotNull(fw.Device);
            Assert.IsNotNull(fw.AssetManager);
            Assert.IsNotNull(fw.Renderer);
            Assert.IsNotNull(fw.Light);
        }
Beispiel #4
0
        public void Window_ConstructorTest()
        {
            string title = "Window Test";
            int width = 800, height = 600;

            Window window = new Window(title, width, height);
            Assert.AreEqual(true, window.Created);
            Assert.AreEqual(title, window.Title);
            Assert.AreEqual(width, window.Width);
            Assert.AreEqual(height, window.Height);

            Assert.AreNotEqual(null, window.Handle);
            Assert.AreNotEqual(null, window.Form);
        }
Beispiel #5
0
 public void CreateDevice()
 {
     Window window = new Window("VertexDeclTest", 640, 480);
     this.device = new Irelia.Render.Device(window.Handle, window.Width, window.Height);
 }
Beispiel #6
0
 public void CreateWindow()
 {
     Window = new Window("DeviceTest", 640, 480);
 }