Correct capitalisation of Xcode (#7796)
Ref: https://developer.apple.com/xcode/
This commit is contained in:
@@ -60,7 +60,7 @@ void testUsingContext(String description, dynamic testMethod(), {
|
||||
when(os.isWindows).thenReturn(false);
|
||||
return os;
|
||||
});
|
||||
testContext.putIfAbsent(XCode, () => new XCode());
|
||||
testContext.putIfAbsent(Xcode, () => new Xcode());
|
||||
testContext.putIfAbsent(IOSSimulatorUtils, () {
|
||||
MockIOSSimulatorUtils mock = new MockIOSSimulatorUtils();
|
||||
when(mock.getAttachedDevices()).thenReturn(<IOSSimulator>[]);
|
||||
|
||||
@@ -13,9 +13,9 @@ import '../context.dart';
|
||||
|
||||
void main() {
|
||||
group('iOS Workflow validation', () {
|
||||
MockXCode xcode;
|
||||
MockXcode xcode;
|
||||
setUp(() {
|
||||
xcode = new MockXCode();
|
||||
xcode = new MockXcode();
|
||||
});
|
||||
|
||||
testUsingContext('Emit missing status when nothing is installed', () async {
|
||||
@@ -25,14 +25,14 @@ void main() {
|
||||
..hasIosDeploy = false;
|
||||
ValidationResult result = await workflow.validate();
|
||||
expect(result.type, ValidationType.missing);
|
||||
}, overrides: <Type, Generator>{ XCode: () => xcode });
|
||||
}, overrides: <Type, Generator>{ Xcode: () => xcode });
|
||||
|
||||
testUsingContext('Emits partial status when Xcode is not installed', () async {
|
||||
when(xcode.isInstalled).thenReturn(false);
|
||||
IOSWorkflowTestTarget workflow = new IOSWorkflowTestTarget();
|
||||
ValidationResult result = await workflow.validate();
|
||||
expect(result.type, ValidationType.partial);
|
||||
}, overrides: <Type, Generator>{ XCode: () => xcode });
|
||||
}, overrides: <Type, Generator>{ Xcode: () => xcode });
|
||||
|
||||
testUsingContext('Emits partial status when Xcode version too low', () async {
|
||||
when(xcode.isInstalled).thenReturn(true);
|
||||
@@ -43,7 +43,7 @@ void main() {
|
||||
IOSWorkflowTestTarget workflow = new IOSWorkflowTestTarget();
|
||||
ValidationResult result = await workflow.validate();
|
||||
expect(result.type, ValidationType.partial);
|
||||
}, overrides: <Type, Generator>{ XCode: () => xcode });
|
||||
}, overrides: <Type, Generator>{ Xcode: () => xcode });
|
||||
|
||||
testUsingContext('Emits partial status when Xcode EULA not signed', () async {
|
||||
when(xcode.isInstalled).thenReturn(true);
|
||||
@@ -54,7 +54,7 @@ void main() {
|
||||
IOSWorkflowTestTarget workflow = new IOSWorkflowTestTarget();
|
||||
ValidationResult result = await workflow.validate();
|
||||
expect(result.type, ValidationType.partial);
|
||||
}, overrides: <Type, Generator>{ XCode: () => xcode });
|
||||
}, overrides: <Type, Generator>{ Xcode: () => xcode });
|
||||
|
||||
testUsingContext('Emits partial status when homebrew not installed', () async {
|
||||
when(xcode.isInstalled).thenReturn(true);
|
||||
@@ -66,7 +66,7 @@ void main() {
|
||||
..hasHomebrew = false;
|
||||
ValidationResult result = await workflow.validate();
|
||||
expect(result.type, ValidationType.partial);
|
||||
}, overrides: <Type, Generator>{ XCode: () => xcode });
|
||||
}, overrides: <Type, Generator>{ Xcode: () => xcode });
|
||||
|
||||
testUsingContext('Emits partial status when ios-deploy is not installed', () async {
|
||||
when(xcode.isInstalled).thenReturn(true);
|
||||
@@ -78,7 +78,7 @@ void main() {
|
||||
..hasIosDeploy = false;
|
||||
ValidationResult result = await workflow.validate();
|
||||
expect(result.type, ValidationType.partial);
|
||||
}, overrides: <Type, Generator>{ XCode: () => xcode });
|
||||
}, overrides: <Type, Generator>{ Xcode: () => xcode });
|
||||
|
||||
testUsingContext('Emits partial status when ios-deploy version is too low', () async {
|
||||
when(xcode.isInstalled).thenReturn(true);
|
||||
@@ -90,7 +90,7 @@ void main() {
|
||||
..iosDeployVersionText = '1.8.0';
|
||||
ValidationResult result = await workflow.validate();
|
||||
expect(result.type, ValidationType.partial);
|
||||
}, overrides: <Type, Generator>{ XCode: () => xcode });
|
||||
}, overrides: <Type, Generator>{ Xcode: () => xcode });
|
||||
|
||||
testUsingContext('Succeeds when all checks pass', () async {
|
||||
when(xcode.isInstalled).thenReturn(true);
|
||||
@@ -100,11 +100,11 @@ void main() {
|
||||
when(xcode.eulaSigned).thenReturn(true);
|
||||
ValidationResult result = await new IOSWorkflowTestTarget().validate();
|
||||
expect(result.type, ValidationType.installed);
|
||||
}, overrides: <Type, Generator>{ XCode: () => xcode });
|
||||
}, overrides: <Type, Generator>{ Xcode: () => xcode });
|
||||
});
|
||||
}
|
||||
|
||||
class MockXCode extends Mock implements XCode {}
|
||||
class MockXcode extends Mock implements Xcode {}
|
||||
|
||||
class IOSWorkflowTestTarget extends IOSWorkflow {
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user