server-side-test.js revision ece5a262d20a50d0abf584d0f7ec73929ede9cfd
/*
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions copyright [year] [name of copyright owner]".
*
* Copyright 2013-2014 ForgeRock AS.
*/
describe("ComparisonResult test suite", function() {
it("should create comparison result with zero penalty points", function() {
// Given
// When
var comparisonResult = new ComparisonResult();
//Then
});
it("should create comparison result with zero penalty points using constant", function() {
// Given
// When
//Then
});
it("should create comparison result with penalty points and additional info", function() {
// Given
// When
//Then
});
it("should create comparison result with penalty points", function() {
// Given
// When
//Then
});
it("should create comparison result with additional info", function() {
// Given
// When
var comparisonResult = new ComparisonResult(true);
//Then
});
it("should add comparison result", function() {
// Given
// When
//Then
});
it("should get comparison result successful", function() {
// Given
// When
//Then
});
it("should get comparison result unsuccessful", function() {
// Given
// When
//Then
});
it("should compare comparison results equally", function() {
// Given
// When
//Then
});
it("should compare comparison results not equal penalty points", function() {
// Given
// When
//Then
});
it("should compare comparison results with equal penalty points but one with additional info", function() {
// Given
// When
//Then
});
it("should compare comparison results with null", function() {
// Given
var anotherComparisonResult = null;
// When
//Then
});
it("should sort comparison results with descending penalty points", function() {
// Given
var comparisonResults = [
];
// When
//Then
});
});
describe("ScalarComparator test suite", function() {
it("should compare with no penalty points", function () {
// Given
var currentValue = "CURRENT_VALUE";
var storedValue = "STORED_VALUE";
// When
//Then
});
it("should compare when stored value is different to current value", function () {
// Given
var currentValue = "CURRENT_VALUE";
var storedValue = "STORED_VALUE";
// When
//Then
});
it("should compare when stored value is not null and current value is null", function () {
// Given
var currentValue = null;
var storedValue = "STORED_VALUE";
// When
//Then
});
it("should compare when stored value is null and current value is not null", function () {
// Given
var currentValue = "CURRENT_VALUE";
var storedValue = null;
// When
//Then
});
});
describe("ScreenComparator test suite", function() {
it("should compare screens that are equal", function() {
// Given
// When
//Then
});
it("should compare screens that are null", function() {
// Given
var currentValue = null;
var storedValue = null;
// When
//Then
});
it("should compare screens with null values", function() {
// Given
// When
//Then
});
it("should compare screens when stored screen width is null", function() {
// Given
// When
//Then
});
it("should compare screens when stored screen width is different to current screen width", function() {
// Given
// When
//Then
});
it("should compare screens when stored screen height is null", function() {
// Given
// When
//Then
});
it("should compare screens when stored screen height is different to current screen height", function() {
// Given
// When
//Then
});
it("should compare screens when stored screen colour depth is null", function() {
// Given
// When
//Then
});
it("should compare screens when stored screen colour depth is different to current screen colour depth", function() {
// Given
// When
//Then
});
});
describe("MultiValueComparator test suite", function() {
it("should compare multi value strings when stored value is null and current value is empty", function() {
// Given
var currentValue = "";
var storedValue = null;
// When
//Then
});
it("should compare multi value strings when both are null", function() {
// Given
var currentValue = null;
var storedValue = null;
// When
//Then
});
it("should compare multi value strings when both are empty", function() {
// Given
var currentValue = "";
var storedValue = "";
// When
//Then
});
it("should compare multi value strings when current value is null", function() {
// Given
var currentValue = null;
var storedValue = "VALUE_A; VALUE_B; VALUE_C; VALUE_D; VALUE_E";
// When
//Then
});
it("should compare multi value strings when stored value is null", function() {
// Given
var currentValue = "VALUE_A; VALUE_B; VALUE_C; VALUE_D; VALUE_E";
var storedValue = null;
// When
//Then
});
it("should compare multi value strings when both are equal", function() {
// Given
var currentValue = "VALUE_A; VALUE_B; VALUE_C; VALUE_D; VALUE_E";
var storedValue = "VALUE_A; VALUE_B; VALUE_C; VALUE_D; VALUE_E";
// When
//Then
});
it("should compare multi value string when there are less differences than max", function() {
// Given
var currentValue = "VALUE_AA; VALUE_B; VALUE_C; VALUE_D; VALUE_E";
var storedValue = "VALUE_B; VALUE_C; VALUE_D; VALUE_E";
// When
//Then
});
it("should compare multi value string when there are more differences than max", function() {
// Given
var currentValue = "VALUE_AA; VALUE_BB; VALUE_C; VALUE_D; VALUE_E";
var storedValue = "VALUE_B; VALUE_C; VALUE_D; VALUE_E";
// When
//Then
});
it("should compare multi value string when there is less percentage diff than max", function() {
// Given
var currentValue = "VALUE_AA; VALUE_B; VALUE_C; VALUE_D; VALUE_E";
var storedValue = "VALUE_B; VALUE_C; VALUE_D; VALUE_E";
// When
//Then
});
it("should compare multi value string when there is more percentage diff than max", function() {
// Given
var currentValue = "VALUE_AA; VALUE_BB; VALUE_C; VALUE_D; VALUE_E";
var storedValue = "VALUE_B; VALUE_C; VALUE_D; VALUE_E";
// When
//Then
});
});
describe("UserAgentComparator test suite", function() {
it("should compare user agents", function () {
// Given
var currentValue = "USER_AGENT_1234567890.";
var storedValue = "1234USER_.567890AGENT_";
// When
//Then
});
it("should compare user agents ignoring version numbers", function () {
// Given
var currentValue = "USER_AGENT_1234567890.";
var storedValue = "1234USER_.567890AGENT_";
// When
//Then
});
it("should compare user agents when both are null", function () {
// Given
var currentValue = null;
var storedValue = null;
// When
//Then
});
it("should compare user agents when current value is null", function () {
// Given
var currentValue = null;
var storedValue = "1234USER_.567890AGENT_";
// When
//Then
});
it("should compare user agents when stored value is null", function () {
// Given
var currentValue = "USER_AGENT_1234567890.";
var storedValue = null;
// When
//Then
});
});
describe("GeolocationComparator test suite", function() {
it("should compare location when both locations are null", function () {
// Given
var current = null;
var stored = null;
// When
//Then
});
it("should compare location when both latitudes are null", function () {
// Given
// When
//Then
});
it("should compare location when both longitudes are null", function () {
// Given
// When
//Then
});
it("should compare location when current location is null", function () {
// Given
var current = null;
// When
//Then
});
it("should compare location when current latitude is null", function () {
// Given
// When
//Then
});
it("should compare location when current longitude is null", function () {
// Given
// When
//Then
});
it("should compare location when stored location is null", function () {
// Given
var stored = null;
// When
//Then
});
it("should compare location when stored latitude is null", function () {
// Given
// When
//Then
});
it("should compare location when stored longitude is null", function () {
// Given
// When
//Then
});
it("should compare locations that are equal", function () {
// Given
// When
//Then
});
it("should compare locations that are within tolerable range", function () {
// Given
// When
//Then
});
it("should compare locations that are outside tolerable range", function () {
// Given
// When
//Then
});
});