Untitled diff
648 lines
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.XrmMockGenerator = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.XrmMockGenerator = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
"use strict";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Object.defineProperty(exports, "__esModule", { value: true });
var ClientContextMock = (function () {
var ClientContextMock = (function () {
function ClientContextMock(client, clientState) {
function ClientContextMock(client, clientState) {
this.client = client;
this.client = client;
this.clientState = clientState;
this.clientState = clientState;
}
}
ClientContextMock.prototype.getClient = function () {
ClientContextMock.prototype.getClient = function () {
return this.client;
return this.client;
};
};
ClientContextMock.prototype.getClientState = function () {
ClientContextMock.prototype.getClientState = function () {
return this.clientState;
return this.clientState;
};
};
return ClientContextMock;
return ClientContextMock;
}());
}());
exports.ClientContextMock = ClientContextMock;
exports.ClientContextMock = ClientContextMock;
},{}],2:[function(require,module,exports){
},{}],2:[function(require,module,exports){
"use strict";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Object.defineProperty(exports, "__esModule", { value: true });
var ItemCollectionMock = (function () {
var ItemCollectionMock = (function () {
function ItemCollectionMock(itemCollection) {
function ItemCollectionMock(itemCollection) {
this.itemCollection = itemCollection || [];
this.itemCollection = itemCollection || [];
}
}
ItemCollectionMock.prototype.forEach = function (delegate) {
ItemCollectionMock.prototype.forEach = function (delegate) {
var modifiedCollection = this.itemCollection.map(delegate);
var modifiedCollection = this.itemCollection.map(delegate);
this.itemCollection = modifiedCollection;
this.itemCollection = modifiedCollection;
};
};
ItemCollectionMock.prototype.get = function (param) {
ItemCollectionMock.prototype.get = function (param) {
if (param === undefined || param === null) {
if (param === undefined || param === null) {
return this.itemCollection;
return this.itemCollection;
}
}
else if (param && typeof param === 'string') {
else if (typeof param === 'string') {
var attrs = this.itemCollection.filter(function (item) {
var attribute;
return (item.getName() === param);
for (var i in this.itemCollection) {
});
var item = this.itemCollection[i];
return attrs[0] || undefined;
if (item.getName !== undefined) {
if (item.getName() === param) {
attribute = item;
break;
}
}
}
return attribute;
}
}
else if (typeof param === 'number') {
else if (typeof param === 'number') {
return this.itemCollection[param];
return this.itemCollection[param];
}
}
else if (param && param !== undefined) {
else if (param !== undefined) {
throw ('get itemcollection as delegate not implemented');
throw ('get itemcollection as delegate not implemented');
}
}
};
};
ItemCollectionMock.prototype.getLength = function () {
ItemCollectionMock.prototype.getLength = function () {
return this.itemCollection.length;
return this.itemCollection.length;
};
};
return ItemCollectionMock;
return ItemCollectionMock;
}());
}());
exports.ItemCollectionMock = ItemCollectionMock;
exports.ItemCollectionMock = ItemCollectionMock;
},{}],3:[function(require,module,exports){
},{}],3:[function(require,module,exports){
"use strict";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Object.defineProperty(exports, "__esModule", { value: true });
var ContextMock = (function () {
var ContextMock = (function () {
function ContextMock(components) {
function ContextMock(components) {
this.client = components.clientContext;
this.client = components.clientContext;
this.clientUrl = components.clientUrl;
this.clientUrl = components.clientUrl;
this.currentTheme = components.currentTheme;
this.currentTheme = components.currentTheme;
this.isAutoSaveEnabled = components.isAutoSaveEnabled;
this.isAutoSaveEnabled = components.isAutoSaveEnabled;
this.orgLcid = components.orgLcid;
this.orgLcid = components.orgLcid;
this.orgUniqueName = components.orgUniqueName;
this.orgUniqueName = components.orgUniqueName;
this.timeZoneOffset = components.timeZoneOffset;
this.timeZoneOffset = components.timeZoneOffset;
this.userId = components.userId;
this.userId = components.userId;
this.userLcid = components.userLcid;
this.userLcid = components.userLcid;
this.userName = components.userName;
this.userName = components.userName;
this.userRoles = components.userRoles;
this.userRoles = components.userRoles;
this.version = components.version;
this.version = components.version;
}
}
ContextMock.prototype.getClientUrl = function () {
ContextMock.prototype.getClientUrl = function () {
return this.clientUrl;
return this.clientUrl;
};
};
ContextMock.prototype.getCurrentTheme = function () {
ContextMock.prototype.getCurrentTheme = function () {
return this.currentTheme;
return this.currentTheme;
};
};
ContextMock.prototype.getIsAutoSaveEnabled = function () {
ContextMock.prototype.getIsAutoSaveEnabled = function () {
return this.isAutoSaveEnabled;
return this.isAutoSaveEnabled;
};
};
ContextMock.prototype.getOrgLcid = function () {
ContextMock.prototype.getOrgLcid = function () {
return this.orgLcid;
return this.orgLcid;
};
};
ContextMock.prototype.getOrgUniqueName = function () {
ContextMock.prototype.getOrgUniqueName = function () {
return this.orgUniqueName;
return this.orgUniqueName;
};
};
ContextMock.prototype.getQueryStringParameters = function () {
ContextMock.prototype.getQueryStringParameters = function () {
throw ('get query string parameters not implemented');
throw ('get query string parameters not implemented');
};
};
ContextMock.prototype.getTimeZoneOffsetMinutes = function () {
ContextMock.prototype.getTimeZoneOffsetMinutes = function () {
return this.timeZoneOffset;
return this.timeZoneOffset;
};
};
ContextMock.prototype.getUserId = function () {
ContextMock.prototype.getUserId = function () {
return this.userId;
return this.userId;
};
};
ContextMock.prototype.getUserLcid = function () {
ContextMock.prototype.getUserLcid = function () {
return this.userLcid;
return this.userLcid;
};
};
ContextMock.prototype.getUserName = function () {
ContextMock.prototype.getUserName = function () {
return this.userName;
return this.userName;
};
};
ContextMock.prototype.getUserRoles = function () {
ContextMock.prototype.getUserRoles = function () {
return this.userRoles;
return this.userRoles;
};
};
ContextMock.prototype.getVersion = function () {
ContextMock.prototype.getVersion = function () {
return this.version;
return this.version;
};
};
ContextMock.prototype.prependOrgName = function (sPath) {
ContextMock.prototype.prependOrgName = function (sPath) {
return sPath + this.orgUniqueName;
return sPath + this.orgUniqueName;
};
};
return ContextMock;
return ContextMock;
}());
}());
exports.ContextMock = ContextMock;
exports.ContextMock = ContextMock;
},{}],4:[function(require,module,exports){
},{}],4:[function(require,module,exports){
"use strict";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Object.defineProperty(exports, "__esModule", { value: true });
var DataMock = (function () {
var DataMock = (function () {
function DataMock(entity, process) {
function DataMock(entity, process) {
this.entity = entity;
this.entity = entity;
this.process = process;
this.process = process;
}
}
DataMock.prototype.refresh = function (save) {
DataMock.prototype.refresh = function (save) {
throw ('refresh not implemented');
throw ('refresh not implemented');
};
};
DataMock.prototype.save = function (saveOptions) {
DataMock.prototype.save = function (saveOptions) {
throw ('save not implemented');
throw ('save not implemented');
};
};
return DataMock;
return DataMock;
}());
}());
exports.DataMock = DataMock;
exports.DataMock = DataMock;
},{}],5:[function(require,module,exports){
},{}],5:[function(require,module,exports){
"use strict";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Object.defineProperty(exports, "__esModule", { value: true });
var ProcessDictionaryMock = (function () {
var ProcessDictionaryMock = (function () {
function ProcessDictionaryMock() {
function ProcessDictionaryMock() {
}
}
return ProcessDictionaryMock;
return ProcessDictionaryMock;
}());
}());
exports.ProcessDictionaryMock = ProcessDictionaryMock;
exports.ProcessDictionaryMock = ProcessDictionaryMock;
},{}],6:[function(require,module,exports){
},{}],6:[function(require,module,exports){
"use strict";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Object.defineProperty(exports, "__esModule", { value: true });
var ProcessManagerMock = (function () {
var ProcessManagerMock = (function () {
function ProcessManagerMock(enabledProcesses) {
function ProcessManagerMock(enabledProcesses) {
this.enabledProcesses = enabledProcesses;
this.enabledProcesses = enabledProcesses;
}
}
ProcessManagerMock.prototype.getActiveProcess = function () {
ProcessManagerMock.prototype.getActiveProcess = function () {
return this.enabledProcesses.filter(function (p) {
return this.enabledProcesses.filter(function (p) {
return p.isRendered();
return p.isRendered();
})[0] || undefined;
})[0] || undefined;
};
};
ProcessManagerMock.prototype.setActiveProcess = function (processId, callbackFunction) {
ProcessManagerMock.prototype.setActiveProcess = function (processId, callbackFunction) {
var activeProcess = this.getActiveProcess();
var activeProcess = this.getActiveProcess();
if (activeProcess) {
if (activeProcess) {
var newProcess = this.enabledProcesses.filter(function (p) {
var newProcess = this.enabledProcesses.filter(function (p) {
return p.getId() === processId;
return p.getId() === processId;
})[0] || undefined;
})[0] || undefined;
if (newProcess) {
if (newProcess) {
activeProcess.isRendered = function () { return false; };
activeProcess.isRendered = function () { return false; };
newProcess.isRendered = function () { return true; };
newProcess.isRendered = function () { return true; };
}
}
}
}
};
};
ProcessManagerMock.prototype.getActiveStage = function () {
ProcessManagerMock.prototype.getActiveStage = function () {
var activeProcess = this.getActiveProcess();
var activeProcess = this.getActiveProcess();
var stages = activeProcess.getStages();
var stages = activeProcess.getStages();
return stages.forEach(function (s) {
return stages.forEach(function (s) {
return s.getStatus() === 'active';
return s.getStatus() === 'active';
})[0] || undefined;
})[0] || undefined;
};
};
ProcessManagerMock.prototype.setActiveStage = function (stageId, callbackFunction) {
ProcessManagerMock.prototype.setActiveStage = function (stageId, callbackFunction) {
var activeProcess = this.getActiveProcess();
var activeProcess = this.getActiveProcess();
var stages = activeProcess.getStages();
var stages = activeProcess.getStages();
return stages.forEach(function (s) {
return stages.forEach(function (s) {
return s.getId() === stageId;
return s.getId() === stageId;
})[0] || undefined;
})[0] || undefined;
};
};
ProcessManagerMock.prototype.getActivePath = function () {
ProcessManagerMock.prototype.getActivePath = function () {
throw ('get active path not implemented');
throw ('get active path not implemented');
};
};
ProcessManagerMock.prototype.getEnabledProcesses = function (callbackFunction) {
ProcessManagerMock.prototype.getEnabledProcesses = function (callbackFunction) {
callbackFunction(this.enabledProcesses);
callbackFunction(this.enabledProcesses);
};
};
ProcessManagerMock.prototype.getSelectedStage = function () {
ProcessManagerMock.prototype.getSelectedStage = function () {
throw ('get selected not implemented');
throw ('get selected not implemented');
};
};
ProcessManagerMock.prototype.addOnStageChange = function (handler) {
ProcessManagerMock.prototype.addOnStageChange = function (handler) {
throw ('add on stage change not implemented');
throw ('add on stage change not implemented');
};
};
ProcessManagerMock.prototype.addOnStageSelected = function (handler) {
ProcessManagerMock.prototype.addOnStageSelected = function (handler) {
throw ('add on stage selected not implemented');
throw ('add on stage selected not implemented');
};
};
ProcessManagerMock.prototype.removeOnStageChange = function (handler) {
ProcessManagerMock.prototype.removeOnStageChange = function (handler) {
throw ('remove on stage change not implemented');
throw ('remove on stage change not implemented');
};
};
ProcessManagerMock.prototype.removeOnStageSelected = function (handler) {
ProcessManagerMock.prototype.removeOnStageSelected = function (handler) {
throw ('remove on stage selected not implemented');
throw ('remove on stage selected not implemented');
};
};
ProcessManagerMock.prototype.moveNext = function (callbackFunction) {
ProcessManagerMock.prototype.moveNext = function (callbackFunction) {
throw ('move next not implemented');
throw ('move next not implemented');
};
};
ProcessManagerMock.prototype.movePrevious = function (callbackFunction) {
ProcessManagerMock.prototype.movePrevious = function (callbackFunction) {
throw ('move previous not implemented');
throw ('move previous not implemented');
};
};
return ProcessManagerMock;
return ProcessManagerMock;
}());
}());
exports.ProcessManagerMock = ProcessManagerMock;
exports.ProcessManagerMock = ProcessManagerMock;
},{}],7:[function(require,module,exports){
},{}],7:[function(require,module,exports){
"use strict";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Object.defineProperty(exports, "__esModule", { value: true });
var AttributeMock = (function () {
var AttributeMock = (function () {
function AttributeMock(components) {
function AttributeMock(components) {
this.eventHandlers = [];
this.name = components.name;
this.name = components.name;
this.value = components.value;
this.value = components.value;
this.isDirty = components.isDirty;
this.isDirty = components.isDirty;
this.requiredLevel = components.requiredLevel;
this.requiredLevel = components.requiredLevel;
this.submitMode = components.submitMode;
this.submitMode = components.submitMode;
this.controls = components.controls;
this.controls = components.controls;
}
}
AttributeMock.prototype.addOnChange = function (handler) {
AttributeMock.prototype.addOnChange = function (handler) {
throw ('addOnChange not implemented');
this.eventHandlers.push(handler);
};
};
AttributeMock.prototype.fireOnChange = function () {
AttributeMock.prototype.fireOnChange = function () {
throw ('fireOnChange not implemented');
if (this.eventHandlers.length) {
for (var i = 0; i < this.eventHandlers.length; i++) {
//TODO test - also potentially accepts context as first and only parameter
this.eventHandlers[i].call(this);
}
}
};
};
AttributeMock.prototype.getAttributeType = function () {
AttributeMock.prototype.getAttributeType = function () {
return typeof this.value;
return typeof this.value;
};
};
AttributeMock.prototype.getFormat = function () {
AttributeMock.prototype.getFormat = function () {
return this.attributeFormat;
return this.attributeFormat;
};
};
AttributeMock.prototype.getIsDirty = function () {
AttributeMock.prototype.getIsDirty = function () {
return this.isDirty;
return this.isDirty;
};
};
AttributeMock.prototype.getName = function () {
AttributeMock.prototype.getName = function () {
return this.name;
return this.name;
};
};
AttributeMock.prototype.getParent = function () {
AttributeMock.prototype.getParent = function () {
throw ('getParent not implemented');
throw ('getParent not implemented');
};
};
AttributeMock.prototype.getRequiredLevel = function () {
AttributeMock.prototype.getRequiredLevel = function () {
return this.requiredLevel;
return this.requiredLevel;
};
};
AttributeMock.prototype.getSubmitMode = function () {
AttributeMock.prototype.getSubmitMode = function () {
return this.submitMode;
return this.submitMode;
};
};
AttributeMock.prototype.getUserPrivilege = function () {
AttributeMock.prototype.getUserPrivilege = function () {
throw ('getUserPrivilege not implemented');
throw ('getUserPrivilege not implemented');
};
};
AttributeMock.prototype.removeOnChange = function (handler) {
AttributeMock.prototype.removeOnChange = function (handler) {
throw ('removeOnChange not implemented');
throw ('removeOnChange not implemented');
};
};
AttributeMock.prototype.setRequiredLevel = function (requirementLevel) {
AttributeMock.prototype.setRequiredLevel = function (requirementLevel) {
this.requiredLevel = requirementLevel;
this.requiredLevel = requirementLevel;
};
};
AttributeMock.prototype.setSubmitMode = function (submitMode) {
AttributeMock.prototype.setSubmitMode = function (submitMode) {
this.submitMode = submitMode;
this.submitMode = submitMode;
};
};
AttributeMock.prototype.getValue = function () {
AttributeMock.prototype.getValue = function () {
return this.value;
return this.value;
};
};
AttributeMock.prototype.setValue = function (value) {
AttributeMock.prototype.setValue = function (value) {
this.value = value;
this.value = value;
this.fireOnChange();
this.isDirty = true;
this.isDirty = true;
};
};
return AttributeMock;
return AttributeMock;
}());
}());
exports.AttributeMock = AttributeMock;
exports.AttributeMock = AttributeMock;
},{}],8:[function(require,module,exports){
},{}],8:[function(require,module,exports){
"use strict";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Object.defineProperty(exports, "__esModule", { value: true });
var AutoLookupControlMock = (function () {
var AutoLookupControlMock = (function () {
function AutoLookupControlMock(standardControl, uiKeyPressable) {
function AutoLookupControlMock(standardControl, uiKeyPressable) {
this.standardControl = standardControl;
this.standardControl = standardControl;
this.uiKeyPressable = uiKeyPressable;
this.uiKeyPressable = uiKeyPressable;
}
}
AutoLookupControlMock.prototype.getValue = function () {
AutoLookupControlMock.prototype.getValue = function () {
throw ('get value not implemented');
return this.standardControl.attribute.getValue();
};
};
AutoLookupControlMock.prototype.hideAutoComplete = function () {
AutoLookupControlMock.prototype.hideAutoComplete = function () {
throw ('hide autocomplete not implemented');
throw ('hide autocomplete not implemented');
};
};
AutoLookupControlMock.prototype.showAutoComplete = function (resultSet) {
AutoLookupControlMock.prototype.showAutoComplete = function (resultSet) {
throw ('show autocomplete not implemented');
throw ('show autocomplete not implemented');
};
};
AutoLookupControlMock.prototype.clearNotification = function (uniqueId) {
AutoLookupControlMock.prototype.clearNotification = function (uniqueId) {
return this.standardControl.clearNotification();
return this.standardControl.clearNotification();
};
};
AutoLookupControlMock.prototype.getDisabled = function () {
AutoLookupControlMock.prototype.getDisabled = function () {
return this.standardControl.getDisabled();
return this.standardControl.getDisabled();
};
};
AutoLookupControlMock.prototype.setDisabled = function (disabled) {
AutoLookupControlMock.prototype.setDisabled = function (disabled) {
this.standardControl.setDisabled(disabled);
this.standardControl.setDisabled(disabled);
};
};
AutoLookupControlMock.prototype.setNotification = function (message, uniqueId) {
AutoLookupControlMock.prototype.setNotification = function (message, uniqueId) {
return this.standardControl.setNotification(message, uniqueId);
return this.standardControl.setNotification(message, uniqueId);
};
};
AutoLookupControlMock.prototype.getAttribute = function () {
AutoLookupControlMock.prototype.getAttribute = function () {
return this.standardControl.getAttribute();
return this.standardControl.getAttribute();
};
};
AutoLookupControlMock.prototype.getControlType = function () {
AutoLookupControlMock.prototype.getControlType = function () {
return this.standardControl.getControlType();
return this.standardControl.getControlType();
};
};
AutoLookupControlMock.prototype.getName = function () {
AutoLookupControlMock.prototype.getName = function () {
return this.standardControl.getName();
return this.standardControl.getName();
};
};
AutoLookupControlMock.prototype.getParent = function () {
AutoLookupControlMock.prototype.getParent = function () {
return this.standardControl.getParent();
return this.standardControl.getParent();
};
};
AutoLookupControlMock.prototype.setVisible = function (visible) {
AutoLookupControlMock.prototype.setVisible = function (visible) {
this.standardControl.setVisible(visible);
this.standardControl.setVisible(visible);
};
};
AutoLookupControlMock.prototype.getLabel = function () {
AutoLookupControlMock.prototype.getLabel = function () {
return this.standardControl.getLabel();
return this.standardControl.getLabel();
};
};
AutoLookupControlMock.prototype.setLabel = function (label) {
AutoLookupControlMock.prototype.setLabel = function (label) {
this.standardControl.setLabel(label);
this.standardControl.setLabel(label);
};
};
AutoLookupControlMock.prototype.getVisible = function () {
AutoLookupControlMock.prototype.getVisible = function () {
return this.standardControl.getVisible();
return this.standardControl.getVisible();
};
};
AutoLookupControlMock.prototype.setFocus = function () {
AutoLookupControlMock.prototype.setFocus = function () {
this.standardControl.setFocus();
this.standardControl.setFocus();
};
};
AutoLookupControlMock.prototype.addOnKeyPress = function (handler) {
AutoLookupControlMock.prototype.addOnKeyPress = function (handler) {
this.uiKeyPressable.addOnKeyPress(handler);
this.uiKeyPressable.addOnKeyPress(handler);
};
};
AutoLookupControlMock.prototype.fireOnKeyPress = function () {
AutoLookupControlMock.prototype.fireOnKeyPress = function () {
this.uiKeyPressable.fireOnKeyPress();
this.uiKeyPressable.fireOnKeyPress();
};
};
AutoLookupControlMock.prototype.removeOnKeyPress = function (handler) {
AutoLookupControlMock.prototype.removeOnKeyPress = function (handler) {
this.uiKeyPressable.removeOnKeyPress(handler);
this.uiKeyPressable.removeOnKeyPress(handler);
};
};
return AutoLookupControlMock;
return AutoLookupControlMock;
}());
}());
exports.AutoLookupControlMock = AutoLookupControlMock;
exports.AutoLookupControlMock = AutoLookupControlMock;
},{}],9:[function(require,module,exports){
},{}],9:[function(require,module,exports){
"use strict";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Object.defineProperty(exports, "__esModule", { value: true });
var BooleanAttributeMock = (function () {
var BooleanAttributeMock = (function () {
function BooleanAttributeMock(attribute, controls) {
function BooleanAttributeMock(attribute, controls) {
this.attribute = attribute;
this.attribute = attribute;
this.initialValue = attribute.getValue();
this.initialValue = attribute.getValue();
}
}
BooleanAttributeMock.prototype.getInitialValue = function () {
BooleanAttributeMock.prototype.getInitialValue = function () {
return this.initialValue;
return this.initialValue;
};
};
BooleanAttributeMock.prototype.getValue = function () {
BooleanAttributeMock.prototype.getValue = function () {
return this.attribute.getValue();
return this.attribute.getValue();
};
};
BooleanAttributeMock.prototype.setValue = function (value) {
BooleanAttributeMock.prototype.setValue = function (value) {
this.attribute.setValue(value);
this.attribute.setValue(value);
};
};
BooleanAttributeMock.prototype.getFormat = function () {
BooleanAttributeMock.prototype.getFormat = function () {
return this.attribute.getFormat();
return this.attribute.getFormat();
};
};
BooleanAttributeMock.prototype.addOnChange = function (handler) {
BooleanAttributeMock.prototype.addOnChange = function (handler) {
this.attribute.addOnChange(handler);
this.attribute.addOnChange(handler);
};
};
BooleanAttributeMock.prototype.fireOnChange = function () {
BooleanAttributeMock.prototype.fireOnChange = function () {
this.attribute.fireOnChange();
this.attribute.fireOnChange();
};
};
BooleanAttributeMock.prototype.getAttributeType = function () {
BooleanAttributeMock.prototype.getAttributeType = function () {
return this.attribute.getAttributeType();
return this.attribute.getAttributeType();
};
};
BooleanAttributeMock.prototype.getIsDirty = function () {
BooleanAttributeMock.prototype.getIsDirty = function () {
return this.attribute.getIsDirty();
return this.attribute.getIsDirty();
};
};
BooleanAttributeMock.prototype.getName = function () {
BooleanAttributeMock.prototype.getName = function () {
return this.attribute.getName();
return this.attribute.getName();
};
};
BooleanAttributeMock.prototype.getParent = function () {
BooleanAttributeMock.prototype.getParent = function () {
return this.attribute.getParent();
return this.attribute.getParent();
};
};
BooleanAttributeMock.prototype.getRequiredLevel = function () {
BooleanAttributeMock.prototype.getRequiredLevel = function () {
return this.attribute.getRequiredLevel();
return this.attribute.getRequiredLevel();
};
};
BooleanAttributeMock.prototype.getSubmitMode = function () {
BooleanAttributeMock.prototype.getSubmitMode = function () {
return this.attribute.getSubmitMode();
return this.attribute.getSubmitMode();
};
};
BooleanAttributeMock.prototype.getUserPrivilege = function () {
BooleanAttributeMock.prototype.getUserPrivilege = function () {
return this.attribute.getUserPrivilege();
return this.attribute.getUserPrivilege();
};
};
BooleanAttributeMock.prototype.removeOnChange = function (handler) {
BooleanAttributeMock.prototype.removeOnChange = function (handler) {
this.attribute.removeOnChange(handler);
this.attribute.removeOnChange(handler);
};
};
BooleanAttributeMock.prototype.setRequiredLevel = function (requirementLevel) {
BooleanAttributeMock.prototype.setRequiredLevel = function (requirementLevel) {
this.attribute.setRequiredLevel(requirementLevel);
this.attribute.setRequiredLevel(requirementLevel);
};
};
BooleanAttributeMock.prototype.setSubmitMode = function (submitMode) {
BooleanAttributeMock.prototype.setSubmitMode = function (submitMode) {
this.attribute.setSubmitMode(submitMode);
this.attribute.setSubmitMode(submitMode);
};
};
return BooleanAttributeMock;
return BooleanAttributeMock;
}());
}());
exports.BooleanAttributeMock = BooleanAttributeMock;
exports.BooleanAttributeMock = BooleanAttributeMock;
},{}],10:[function(require,module,exports){
},{}],10:[function(require,module,exports){
"use strict";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Object.defineProperty(exports, "__esModule", { value: true });
var ControlMock = (function () {
var ControlMock = (function () {
function ControlMock(components) {
function ControlMock(components) {
this.controlType = components.controlType;
this.controlType = components.controlType;
this.uiLabelElement = components.uiLabelElement;
this.uiLabelElement = components.uiLabelElement;
this.uiCanGetVisibleElement = components.uiCanGetVisibleElement;
this.uiCanGetVisibleElement = components.uiCanGetVisibleElement;
this.name = components.name;
this.name = components.name;
this.parent = components.parent;
this.parent = components.parent;
}
}
ControlMock.prototype.getControlType = function () {
ControlMock.prototype.getControlType = function () {
return this.controlType;
return this.controlType;
};
};
ControlMock.prototype.getName = function () {
ControlMock.prototype.getName = function () {
return this.name;
return this.name;
};
};
ControlMock.prototype.getParent = function () {
ControlMock.prototype.getParent = function () {
return this.parent;
return this.parent;
};
};
ControlMock.prototype.getLabel = function () {
ControlMock.prototype.getLabel = function () {
return this.uiLabelElement.getLabel();
return this.uiLabelElement.getLabel();
};
};
ControlMock.prototype.setLabel = function (label) {
ControlMock.prototype.setLabel = function (label) {
this.uiLabelElement.setLabel(label);
this.uiLabelElement.setLabel(label);
};
};
ControlMock.prototype.getVisible = function () {
ControlMock.prototype.getVisible = function () {
return this.uiCanGetVisibleElement.getVisible();
return this.uiCanGetVisibleElement.getVisible();
};
};
return ControlMock;
return ControlMock;
}());
}());
exports.ControlMock = ControlMock;
exports.ControlMock = ControlMock;
},{}],11:[function(require,module,exports){
},{}],11:[function(require,module,exports){
"use strict";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Object.defineProperty(exports, "__esModule", { value: true });
var DateAttributeMock = (function () {
var DateAttributeMock = (function () {
function DateAttributeMock(components) {
function DateAttributeMock(components) {
this.attribute = components.attribute;
this.attribute = components.attribute;
this.dateAttributeFormat = components.dateAttributeFormat;
this.dateAttributeFormat = components.dateAttributeFormat;
this.controls = components.controls;
this.controls = components.controls;
this.attribute.attributeFormat = components.dateAttributeFormat;
this.attribute.attributeFormat = components.dateAttributeFormat;
}
}
DateAttributeMock.prototype.getFormat = function () {
DateAttributeMock.prototype.getFormat = function () {
return this.attribute.getFormat();
return this.attribute.getFormat();
};
};
DateAttributeMock.prototype.getValue = function () {
DateAttributeMock.prototype.getValue = function () {
return this.attribute.getValue();
return this.attribute.getValue();
};
};
DateAttributeMock.prototype.setValue = function (value) {
DateAttributeMock.prototype.setValue = function (value) {
this.attribute.setValue(value);
this.attribute.setValue(value);
};
};
DateAttributeMock.prototype.addOnChange = function (handler) {
DateAttributeMock.prototype.addOnChange = function (handler) {
this.attribute.addOnChange(handler);
this.attribute.addOnChange(handler);
};
};
DateAttributeMock.prototype.fireOnChange = function () {
DateAttributeMock.prototype.fireOnChange = function () {
this.attribute.fireOnChange();
this.attribute.fireOnChange();
};
};
DateAttributeMock.prototype.getAttributeType = function () {
DateAttributeMock.prototype.getAttributeType = function () {
return this.attribute.getAttributeType();
return this.attribute.getAttributeType();
};
};
DateAttributeMock.prototype.getIsDirty = function () {
DateAttributeMock.prototype.getIsDirty = function () {
return this.attribute.getIsDirty();
return this.attribute.getIsDirty();
};
};
DateAttributeMock.prototype.getName = function () {
DateAttributeMock.prototype.getName = function () {
return this.attribute.getName();
return this.attribute.getName();
};
};
DateAttributeMock.prototype.getParent = function () {
DateAttributeMock.prototype.getParent = function () {
return this.attribute.getParent();
return this.attribute.getParent();
};
};
DateAttributeMock.prototype.getRequiredLevel = function () {
DateAttributeMock.prototype.getRequiredLevel = function () {
return this.attribute.getRequiredLevel();
return this.attribute.getRequiredLevel();
};
};
DateAttributeMock.prototype.getSubmitMode = function () {
DateAttributeMock.prototype.getSubmitMode = function () {
return this.attribute.getSubmitMode();
return this.attribute.getSubmitMode();
};
};
DateAttributeMock.prototype.getUserPrivilege = function () {
DateAttributeMock.prototype.getUserPrivilege = function () {
return this.attribute.getUserPrivilege();
return this.attribute.getUserPrivilege();
};
};
DateAttributeMock.prototype.removeOnChange = function (handler) {
DateAttributeMock.prototype.removeOnChange = function (handler) {
this.attribute.removeOnChange(handler);
this.attribute.removeOnChange(handler);
};
};
DateAttributeMock.prototype.setRequiredLevel = function (requirementLevel) {
DateAttributeMock.prototype.setRequiredLevel = function (requirementLevel) {
this.attribute.setRequiredLevel(requirementLevel);
this.attribute.setRequiredLevel(requirementLevel);
};
};
DateAttributeMock.prototype.setSubmitMode = function (submitMode) {
DateAttributeMock.prototype.setSubmitMode = function (submitMode) {
this.attribute.setSubmitMode(submitMode);
this.attribute.setSubmitMode(submitMode);
};
};
return DateAttributeMock;
return DateAttributeMock;
}());
}());
exports.DateAttributeMock = DateAttributeMock;
exports.DateAttributeMock = DateAttributeMock;
},{}],12:[function(require,module,exports){
},{}],12:[function(require,module,exports){
"use strict";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Object.defineProperty(exports, "__esModule", { value: true });
var DateControlMock = (function () {
var DateControlMock = (function () {
function DateControlMock(standardControl) {
function DateControlMock(standardControl) {
this.standardControl = standardControl;
this.standardControl = standardControl;
}
}
DateControlMock.prototype.getShowTime = function () {
DateControlMock.prototype.getShowTime = function () {
var attribute = this.standardControl.getAttribute();
var attribute = this.standardControl.getAttribute();
return attribute.getFormat() === 'datetime';
return attribute.getFormat() === 'datetime';
};
};
DateControlMock.prototype.setShowTime = function (showTimeValue) {
DateControlMock.prototype.setShowTime = function (showTimeValue) {
var attribute = this.standardControl.getAttribute();
var attribute = this.standardControl.getAttribute();
var attributeFormat = showTimeValue ? 'datetime' : 'date';
var attributeFormat = showTimeValue ? 'datetime' : 'date';
// TODO test
// TODO test
//attribute = new DateAttributeMock(attribute, attributeFormat);
//attribute = new DateAttributeMock(attribute, attributeFormat);
};
};
DateControlMock.prototype.clearNotification = function (uniqueId) {
DateControlMock.prototype.clearNotification = function (uniqueId) {
return this.standardControl.clearNotification();
return this.standardControl.clearNotification();
};
};
DateControlMock.prototype.getDisabled = function () {
DateControlMock.prototype.getDisabled = function () {
return this.standardControl.getDisabled();
return this.standardControl.getDisabled();
};
};
DateControlMock.prototype.setDisabled = function (disabled) {
DateControlMock.prototype.setDisabled = function (disabled) {
this.standardControl.setDisabled(disabled);
this.standardControl.setDisabled(disabled);
};
};
DateControlMock.prototype.setNotification = function (message, uniqueId) {
DateControlMock.prototype.setNotification = function (message, uniqueId) {
return this.standardControl.setNotification(message, uniqueId);
return this.standardControl.setNotification(message, uniqueId);
};
};
DateControlMock.prototype.getAttribute = function () {
DateControlMock.prototype.getAttribute = function () {
return this.standardControl.getAttribute();
return this.standardControl.getAttribute();
};
};
DateControlMock.prototype.getControlType = function () {
DateControlMock.prototype.getControlType = function () {
return this.standardControl.getControlType();
return this.standardControl.getControlType();
};
};
DateControlMock.prototype.getName = function () {
DateControlMock.prototype.getName = function () {
return this.standardControl.getName();
return this.standardControl.getName();
};
};
DateControlMock.prototype.getParent = function () {
DateControlMock.prototype.getParent = function () {
return this.standardControl.getParent();
return this.standardControl.getParent();
};
};
DateControlMock.prototype.setVisible = function (visible) {
DateControlMock.prototype.setVisible = function (visible) {
this.standardControl.setVisible(visible);
this.standardControl.setVisible(visible);
};
};
DateControlMock.prototype.getLabel = function () {
DateControlMock.prototype.getLabel = function () {
return this.standardControl.getLabel();
return this.standardControl.getLabel();
};
};
DateControlMock.prototype.setLabel = function (label) {
DateControlMock.prototype.setLabel = function (label) {
this.standardControl.setLabel(label);
this.standardControl.setLabel(label);
};
};
DateControlMock.prototype.getVisible = function () {
DateControlMock.prototype.getVisible = function () {
return this.standardControl.getVisible();
return this.standardControl.getVisible();
};
};
DateControlMock.prototype.setFocus = function () {
DateControlMock.prototype.setFocus = function () {
this.standardControl.setFocus();
this.standardControl.setFocus();
};
};
return DateControlMock;
return DateControlMock;
}());
}());
exports.DateControlMock = DateControlMock;
exports.DateControlMock = DateControlMock;
},{}],13:[function(require,module,exports){
},{}],13:[function(require,module,exports){
"use strict";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Object.defineProperty(exports, "__esModule", { value: true });
var EntityMock = (function () {
var EntityMock = (function () {
function EntityMock(attributes) {
function EntityMock(id, attributes) {
this.id = id;
this.attributes = attributes;
this.attributes = attributes;
}
}
EntityMock.prototype.addOnSave = function (handler) {
EntityMock.prototype.addOnSave = function (handler) {
throw ('addOnSave not implemented');
throw ('addOnSave not implemented');
};
};
EntityMock.prototype.getEntityName = function () {
EntityMock.prototype.getEntityName = function () {
throw ('getEntityName not implemented');
throw ('getEntityName not implemented');
};
};
EntityMock.prototype.getDataXml = function () {
EntityMock.prototype.getDataXml = function () {
throw ('getDataXml not implemented');
throw ('getDataXml not implemented');
};
};
EntityMock.prototype.getId = function () {
EntityMock.prototype.getId = function () {
throw ('getId not implemented');
return this.id;
};
};
EntityMock.prototype.getIsDirty = function () {
EntityMock.prototype.getIsDirty = function () {
var isDirty = false;
var isDirty = false;
if (this.attributes) {
if (this.attributes) {
for (var i = 0; i < this.attributes.getLength(); i++) {
for (var i = 0; i < this.attributes.getLength(); i++) {
var attr = this.attributes.get(i);
var attr = this.attributes.get(i);
if (attr.getIsDirty()) {
if (attr.getIsDirty()) {
isDirty = true;
isDirty = true;
break;
break;
}
}
}
}
}
}
return isDirty;
return isDirty;
};
};
EntityMock.prototype.getPrimaryAttributeValue = function () {
EntityMock.prototype.getPrimaryAttributeValue = function () {
throw ('getPrimaryAttributeValue not implemented');
throw ('getPrimaryAttributeValue not implemented');
};
};
EntityMock.prototype.removeOnSave = function (handler) {
EntityMock.prototype.removeOnSave = function (handler) {
throw ('removeOnSave not implemented');
throw ('removeOnSave not implemented');
};
};
EntityMock.prototype.save = function (param) {
EntityMock.prototype.save = function (param) {
throw ('save not implemented');
throw ('save not implemented');
};
};
return EntityMock;
return EntityMock;
}());
}());
exports.EntityMock = EntityMock;
exports.EntityMock = EntityMock;
},{}],14:[function(require,module,exports){
},{}],14:[function(require,module,exports){
"use strict";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
Object.defineProperty(exports, "__esModule", { value: true });
var EnumAttributeMock = (function () {
var EnumAttributeMock = (function () {
function EnumAttributeMock(attribute, controls) {
function EnumAttributeMock(attribute, controls) {
this.attribute = attribute;
this.attribute = attribute;
this.initialValue = attribute.getValue();
this.initialValue = attribute.getValue();
}
}
EnumAttributeMock.prototype.getInitialValue = function () {
EnumAttributeMock.prototype.getInitialValue = function () {
return this.initialValue;
return this.initialValue;
};
};
EnumAttributeMock.prototype.getFormat = function () {
EnumAttributeMock.prototype.getFormat = function () {
return this.attribute.getFormat();
return this.attribute.getFormat();
};
};
EnumAttributeMock.prototype.addOnChange = function (handler) {
EnumAttributeMock.prototype.addOnChange = function (handler) {
this.attribute.addOnChange(handler);
this.attribute.addOnChange(handler);
};
};
EnumAttributeMock.prototype.fireOnChange = function () {
EnumAttributeMock.prototype.fireOnChange = function () {
this.attribute.fireOnChange();
this.attribute.fireOnChange();
};
};
EnumAttributeMock.prototype.getAttributeType = function () {
EnumAttributeMock.prototype.getAttributeType = function () {
return this.attribute.getAttributeType();
return this.attribute.getAttributeType();
};
};
EnumAttributeMock.prototype.getIsDirty = function () {
EnumAttributeMock.prototype.getIsDirty = function () {
return this.attribute.getIsDirty();
return this.attribute.getIsDirty();
};
};
EnumAttributeMock.prototype.getName = function () {
EnumAttributeMock.prototype.getName = function () {
return this.attribute.getName();
return this.attribute.getName();
};
};
EnumAttributeMock.prototype.getParent = function () {
EnumAttributeMock.prototype.getParent = function () {
return this.attribute.getParent();
return this.attribute.getParent();
};
};
EnumAttributeMock.prototype.getRequiredLevel = function () {
EnumAttributeMock.prototype.getRequiredLevel = function () {
return this.attribute.getRequiredLevel();
return this.attribute.getRequiredLevel();
};
};
EnumAttributeMock.prototype.getSubmitMode = function () {
EnumAttributeMock.prototype.getSubmitMode = function () {
return this.attribute.getSubmitMode();
return this.attribute.getSubmitMode();
};
EnumAttributeMock.prototype.getUserPrivilege = function () {
return this.attribute.getUserPrivilege();
};
EnumAttributeMock.prototype.removeOnChange = function (handler) {
this.attribute.removeOnChange(handler);
};
EnumAttributeMock.prototype.setRequiredLevel = function (requirementLevel) {
this.attribute.setRequiredLevel(requirementLevel);
};
EnumAttributeMock.prototype.setSubmitMode = function (submitMode) {
this.attribu