all files / registryResolver/test/ testRegistryResolver.js

100% Statements 10/10
100% Branches 0/0
100% Functions 1/1
100% Lines 10/10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41                                                             
/*
 * 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"));
});