예제 #1
0
        public void ToStringContainsTypeAndName()
        {
            var defaultDevice = new Device(EmulatorTestExtensions.CreateDefaultDeviceData());
            var win8Device    = new Device(EmulatorTestExtensions.CreateWindows8DeviceData());

            Assert.AreEqual("Default", defaultDevice.ToString());
            Assert.AreEqual("Windows - Windows 8 1080p", win8Device.ToString());
        }
        protected override Stream GetDevicesXmlStream()
        {
            var devicesXmlData = new XmlData("Devices");

            devicesXmlData.AddChild(EmulatorTestExtensions.CreateDefaultDeviceData());
            devicesXmlData.AddChild(EmulatorTestExtensions.CreateWindows8DeviceData());
            return(new XmlFile(devicesXmlData).ToMemoryStream());
        }
예제 #3
0
        public void EmulatorDeviceCanBeRotatedAndScaled()
        {
            var device = new Device(EmulatorTestExtensions.CreateWindows8DeviceData());

            Assert.AreEqual("Windows", device.Type);
            Assert.AreEqual("Windows 8 1080p", device.Name);
            Assert.AreEqual("W8Emulator1080p", device.ImageFile);
            Assert.AreEqual(new Point(33, 33), device.ScreenPoint);
            Assert.AreEqual(new Size(1920, 1080), device.ScreenSize);
            Assert.IsTrue(device.CanRotate);
            Assert.IsTrue(device.CanScale);
            Assert.AreEqual(0, device.DefaultScaleIndex);
        }