Mock object generation
AssigneeHome Box Office, Inc.
InventorBrendan Joseph Clark
Life of this patent
Estimating the term…
Abstract
The disclosure is generally directed towards automatically generating a mock object from a description of a real object, such as for use in testing. Mock object generation logic parses the description to determine interface(s) of the real object, which are replicated in the mock object, and to determine method(s) of the real object, which are simulated in the mock object. The mock object generation logic may generate a description of the mock object that is then compiled into the mock object for execution. Data types may be validated so that the arguments and/or return values from the mock object meet the expectations of a calling object.
Claims20
A method, comprising:
- parsing, by a system including a processor, a parsable description language document describing a real object, on which a calling object depends, to generate one or more mock object generation files representative of the real object, wherein the one or more mock object generation files comprise a first description of an interface set of the real object and a second description of a method set of the real object;
- compiling, by the system, the one or more mock object generation files to generate a mock object of the real object, wherein the mock object replicates the interface set of the real object and simulates the method set of the real object.
A system, comprising:
- a processor;
- and
- a memory communicatively coupled to the processor, the memory having stored therein computer-executable instructions, comprising:
- a mock object generation logic component that parses a parsable description language document describing a real object, on which a calling object depends, to generate one or more mock object generation files representative of the real object, wherein the one or more mock object generation files comprise a first description of an interface set of the real object and a second description of a method set of the real object;
- a compiler component that compiles the one or more mock object generation files into a mock object of the real object;
- and
- wherein the mock object comprises an interface set corresponding to the interface set of the real object, and is configured to simulate a method set corresponding to the method set of the real object.
One or more machine-readable storage media having machine-executable instructions that, perform operations comprising:
- parsing an interface description language document describing a real object, on which a calling object depends, to generate one or more mock object generation files representative of the real object, wherein the one or more mock object generation files comprise a first description of an interface set of the real object and a second description of a method set of the real object;
- and
- compiling, by the system, the one or more mock object generation files to generate a mock object of the real object, wherein the mock object replicates the interface set of the real object and simulates the method set of the real object.
Dependencies are inferred from the claim text.