goog.testing.MockClassRecord
Classgoog.testing.MockClassRecord(namespace, className, originalClass, proxy)
A record that represents all the data associated with a mock replacement of a given class.
namespace
{Object
}
className
{string
}
originalClass
{Function
}
proxy
{Function
}
.addMockInstance(args, mock)
Adds a new mock instance mapping. The mapping connects a set of function arguments to a specific mock instance.
args
{Array
}
mock
{goog.testing.StrictMock
|goog.testing.LooseMock
}
.findMockInstance(args)
Finds the mock corresponding to a given argument set. Throws an error if there is no appropriate match found.
args
{Array
}
goog.testing.StrictMock
|goog.testing.LooseMock
|null
}
.getClassName()
A getter for this record's class name.
string
}
.getNamespace()
A getter for this record's namespace.
Object
}
.getOriginalClass()
A getter for the original class.
Function
}
.getProxy()
A getter for the proxy being used as a replacement for the original class.
Function
}
.getStaticMock()
A getter for the static mock.
goog.testing.StrictMock
|goog.testing.LooseMock
|null
}
.reset()
Resets this record by reverting all the mocked classes back to the original implementation and clearing out the mock instance list.
.setStaticMock(staticMock)
A setter for the static mock.
staticMock
{goog.testing.StrictMock
|goog.testing.LooseMock
}