Class support I
Pre-release
Pre-release
This is the first release to support mocking classes 🎉
Please note that note that properties with inferred types are not yet supported and are ignored. Mocks with these items should still compile. Support for these are coming soon.
Release notes:
- Generate a mock inheriting from a class.
- Generate a mock inheriting from a class and one or more protocols.
- A convenience initializer is generated and a super initializer is called with default values where possible.
- Unoverridable items like
private,fileprivate,static, andfinalare ignored. - Instance methods from classes are supported including methods with default parameters.
- Properties with explicit type annotations are supported
var myProp: String = "" - Properties with unoverridable setters using
private(set),fileprivate(set)are supported. - Computed properties are supported
var myProp: String { return "" } - Transient properties are supported
var myProp: String {
get { return otherValue }
set { otherValue = newValue }
}