Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions TeddyMocks/TeddyMocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ module TeddyMocks {
}
}

overloadedFunctions.forEach((name: string) => {
replacementObject.prototype[name] = () => {
overloadedFunctions.forEach(function(name: string) {
replacementObject.prototype[name] = function() {
(<Function>this.object[name]).apply(this.object, arguments);
}
});
Expand All @@ -174,7 +174,7 @@ module TeddyMocks {
this.expectation.returnValue = u;
}

public withCallback(callback: (arguments: IArguments) => U): void {
public withCallback(callback: (iarguments: IArguments) => U): void {
this.expectation.callback = callback;
}
}
Expand Down Expand Up @@ -211,7 +211,7 @@ module TeddyMocks {
return this.wasCalledInternal(x);
}

public usingCallback(callback: (arguments: IArguments) => boolean): boolean {
public usingCallback(callback: (iarguments: IArguments) => boolean): boolean {
return this.lastExpectation.recordedCalls.some(callback);
}

Expand Down Expand Up @@ -294,7 +294,7 @@ module TeddyMocks {
class Expectation {

public returnValue: any;
public callback: (arguments: IArguments) => any;
public callback: (iarguments: IArguments) => any;
public recordedCalls: Array<IArguments>
public matchCount: number;

Expand All @@ -310,13 +310,13 @@ module TeddyMocks {
this.matchCount = this.countMatchedMethods(expectedArguments, validateArguments);
}

public record(arguments: IArguments): void {
this.recordedCalls.push(arguments);
public record(iarguments: IArguments): void {
this.recordedCalls.push(iarguments);
}

public getReturnValue(arguments: IArguments): any {
public getReturnValue(iarguments: IArguments): any {
return this.callback
? this.callback(arguments)
? this.callback(iarguments)
: this.returnValue;
}

Expand Down