public void TestSystemProductName()
        {
            string expected = "iWrapper";

            IKEasClientDeviceInformation wrapper   = new KEasClientDeviceInformation(systemProductName: expected);
            EasClientDeviceInformation   easClient = new EasClientDeviceInformation();

            Assert.AreEqual(
                expected, wrapper.SystemProductName,
                "Property was not initialised correctly");
            Assert.AreNotEqual(
                wrapper.SystemProductName, easClient.SystemProductName,
                "Property was not wrapped correctly");
        }
        public void TestSystemSku()
        {
            string expected = "TheresSomethingAskewAboutThis";

            IKEasClientDeviceInformation wrapper   = new KEasClientDeviceInformation(systemSku: expected);
            EasClientDeviceInformation   easClient = new EasClientDeviceInformation();

            Assert.AreEqual(
                expected, wrapper.SystemSku,
                "Property was not initialised correctly");
            Assert.AreNotEqual(
                wrapper.SystemSku, easClient.SystemSku,
                "Property was not wrapped correctly");
        }
        public void TestSystemManufacturer()
        {
            string expected = "PearShapedInc";

            IKEasClientDeviceInformation wrapper   = new KEasClientDeviceInformation(systemManufacturer: expected);
            EasClientDeviceInformation   easClient = new EasClientDeviceInformation();

            Assert.AreEqual(
                expected, wrapper.SystemManufacturer,
                "Property was not initialised correctly");
            Assert.AreNotEqual(
                wrapper.SystemManufacturer, easClient.SystemManufacturer,
                "Property was not wrapped correctly");
        }
Example #4
0
        public void TestGetKanoPcSku(string sku, KanoPcSku kpcSku)
        {
            // Setup any objects and mocks.
            IKEasClientDeviceInformation deviceInfo = new KEasClientDeviceInformation(systemSku: sku);
            IKanoPlatformDetector        detector   = new KanoPlatformDetector(deviceInfo);

            // Call the method under test.
            KanoPcSku actualSku = detector.GetKanoPcSku();

            // Verify the results produced.
            Assert.AreEqual(
                kpcSku, actualSku,
                "Detection function is not returning the expected Kano PC SKU");
        }
Example #5
0
        public void TestGetKanoDevice(string productName, KanoDevice device)
        {
            // Setup any objects and mocks.
            IKEasClientDeviceInformation deviceInfo = new KEasClientDeviceInformation(systemProductName: productName);
            IKanoPlatformDetector        detector   = new KanoPlatformDetector(deviceInfo);

            // Call the method under test.
            KanoDevice actualDevice = detector.GetKanoDevice();

            // Verify the results produced.
            Assert.AreEqual(
                device, actualDevice,
                "Detection function is not returning the expected device");
        }
Example #6
0
        public void TestIsKanoPc(string productName, KanoDevice device)
        {
            // Setup any objects and mocks.
            IKEasClientDeviceInformation deviceInfo = new KEasClientDeviceInformation(systemProductName: productName);
            IKanoPlatformDetector        detector   = new KanoPlatformDetector(deviceInfo);
            string kpcProductName = KanoPlatformIds.KanoDeviceIds.FirstOrDefault(x => x.Value == KanoDevice.KanoPc).Key;

            // Call the method under test.
            bool isKanoPc = detector.IsKanoPc();

            // Verify the results produced.
            Assert.AreEqual(
                productName == kpcProductName, isKanoPc,
                "The Kano PC identifier is listed but the detection function is failing");
            if (isKanoPc)
            {
                Assert.IsTrue(
                    device != KanoDevice.Unknown,
                    "A listed device cannot be Unknown");
            }
        }
Example #7
0
        public void TestIsKanoDevice(string productName, KanoDevice device)
        {
            // Setup any objects and mocks.
            IKEasClientDeviceInformation deviceInfo = new KEasClientDeviceInformation(systemProductName: productName);
            IKanoPlatformDetector        detector   = new KanoPlatformDetector(deviceInfo);
            bool isDeviceListed = KanoPlatformIds.KanoDeviceIds.ContainsKey(productName);

            // Call the method under test.
            bool isKanoDevice = detector.IsKanoDevice();

            // Verify the results produced.
            Assert.AreEqual(
                isDeviceListed, isKanoDevice,
                "The device is listed but the detection function is failing");
            if (isDeviceListed)
            {
                Assert.IsTrue(
                    device != KanoDevice.Unknown,
                    "A listed device cannot be Unknown");
            }
        }