Support for stub generation from unit tests
| Originator: | maria.zverina | ||
| Number: | rdar://14123350 | Date Originated: | 11-Jun-2013 05:51 PM |
| Status: | Open | Resolved: | |
| Product: | Developer Tools | Product Version: | |
| Classification: | Reproducible: | Always |
11-Jun-2013 05:51 PM Maria Zverina:
Summary: Provide support to create implementation stubs
Steps to Reproduce:
Create a unit in Xcode 5 as follows:
-----
- (void)testSimpleQuery
{
QueryProcessor* processor = [[QueryProcessor alloc] init];
NSString *result = [processor query:@"Hello"];
int queryCount = processor.queryCount;
XCTAssertEqualObjects(result, @"some output");
XCTAssertEquals(queryCount, 2);
}
-------
Expected Results:
I would like Xcode to provide following "Quick fixes" to allow me to generate the code from my test.
1) Create QueryProcessor class
2) Create a stub for the query method on the QueryProcessor class
3) Create an integer property queryCount
Most modern IDEs such as JetBrains and Eclipse already implement these concepts.
Actual Results:
I have to manually create the stubs class/method/property before my test will compile.
Regression:
Notes:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!