/*
 * Windows Utilities Unit Tests
 *
 * Copyright 2015 Raising the Floor - International
 *
 * Licensed under the New BSD license. You may not use this file except in
 * compliance with this License.
 *
 * The research leading to these results has received funding from the European Union's
 * Seventh Framework Programme (FP7/2007-2013)
 * under grant agreement no. 289016.
 *
 * You may obtain a copy of the License at
 * https://github.com/GPII/universal/blob/master/LICENSE.txt
 */

"use strict";

var fluid = require("universal");

var jqUnit = fluid.require("jqUnit");
var gpii = fluid.registerNamespace("gpii");

fluid.registerNamespace("gpii.tests.windows.registryResolver");

fluid.require("%gpii-windows");

jqUnit.module("Registry Resolver");

jqUnit.test("Test Boolean Registry Lookups", function () {
    jqUnit.expect(2);

    jqUnit.assertTrue("Testing a registry key that always exists.",
        gpii.deviceReporter.registryKeyExists("HKEY_CURRENT_USER",
            "Software\\Microsoft\\Command Processor", "CompletionChar", "REG_DWORD"));

    jqUnit.assertFalse("Testing a registry key that does not exist.",
        gpii.deviceReporter.registryKeyExists("HKEY_CURRENT_USER",
            "Software\\Microsoft\\ScreenMagnifier", "NotARealSubPath", "REG_DWORD"));
});

/*
 * Windows Utilities Unit Tests
 *
 * Copyright 2015 Raising the Floor - International
 *
 * Licensed under the New BSD license. You may not use this file except in
 * compliance with this License.
 *
 * The research leading to these results has received funding from the European Union's
 * Seventh Framework Programme (FP7/2007-2013)
 * under grant agreement no. 289016.
 *
 * You may obtain a copy of the License at
 * https://github.com/GPII/universal/blob/master/LICENSE.txt
 */

"use strict";

var fluid = require("universal");

var jqUnit = fluid.require("node-jqunit");
var gpii = fluid.registerNamespace("gpii");

fluid.registerNamespace("gpii.tests.windows.registryResolver");

require("../src/RegistryResolver.js");

jqUnit.module("Registry Resolver");

jqUnit.test("Test Boolean Registry Lookups", function () {
    jqUnit.expect(2);

    jqUnit.assertTrue("Testing a registry key that always exists.",
        gpii.deviceReporter.registryKeyExists("HKEY_CURRENT_USER",
            "Software\\Microsoft\\Command Processor", "CompletionChar", "REG_DWORD"));

    jqUnit.assertFalse("Testing a registry key that does not exist.",
        gpii.deviceReporter.registryKeyExists("HKEY_CURRENT_USER",
            "Software\\Microsoft\\ScreenMagnifier", "NotARealSubPath", "REG_DWORD"));
});

Fix for (quietly reported) test failure in registryResolver
GPII-1852: Fix for (quietly reported) test failure in registryResolver
