Legislation
Ontario Citizens
Broader
AODA
1 in 7
Appeal
Market
Slide 7
Slide 7 text
Legislation
Ontario Citizens
Broader
Low Cost in iOS
AODA
Relatively
1 in 7
Appeal
Market
Slide 8
Slide 8 text
iOS is
and
visual
aural
Slide 9
Slide 9 text
You wouldn’t ship a
bad visual interface
Why would you ship a
bad aural one?
Slide 10
Slide 10 text
Accessibility is
HARD
Slide 11
Slide 11 text
WHY?
Slide 12
Slide 12 text
TURN VoiceOver ON
(seriously)
Slide 13
Slide 13 text
Accessibility is
EASY
Slide 14
Slide 14 text
UIAccessibility
Slide 15
Slide 15 text
Part of UIKit Built in
UIAccessibility
Slide 16
Slide 16 text
Part of UIKit Built in
UIAccessibility
Conformed to by UIView Built in
Slide 17
Slide 17 text
Part of UIKit Built in
UIAccessibility
Conformed to by UIView Built in
You can roll your own Built in
Slide 18
Slide 18 text
UIAccessibilityTraits
Causes
Page
Turn
Starts
Media
Session
None
Button
Link
Search Field
Image
Plays Sound
Keyboard Key
Static Text
Summary
Element
Not Enabled Updates Frequently
Adjustable
Allow Direct Interaction
Header
Selected
Honour
Building quality software
is a measure of
Quality
Building accessible software
is a measure of
Slide 24
Slide 24 text
Testing
Unit
Slide 25
Slide 25 text
WHAT IS
UNIT TESTING?
Slide 26
Slide 26 text
WHY UNIT TEST?
Slide 27
Slide 27 text
MODEL
CONTROLLER
VIEW
KVO
OWNS OWNS
USER
INTERACTION
Slide 28
Slide 28 text
MODEL
CONTROLLER
VIEW
KVO
OWNS OWNS
USER
INTERACTION
EXTENSION EXTENSION
Slide 29
Slide 29 text
“Common things are easy and
uncommon things are possible.”
Slide 30
Slide 30 text
Uncommon
“Common things are easy and
uncommon things are possible.”
Unit Testing is
Slide 31
Slide 31 text
Uh oh.
Slide 32
Slide 32 text
Yes!
In Objective-C?
Slide 33
Slide 33 text
No content
Slide 34
Slide 34 text
- (void)testExample
{
STFail(@"Unit tests are not implemented yet in
My Sweet New AppTests");
}
Slide 35
Slide 35 text
And that’s it.
Slide 36
Slide 36 text
OCMock
Introducing
Slide 37
Slide 37 text
Objects
Mock
Slide 38
Slide 38 text
NSURLRequest *dummyURLRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://
example.com"]];
PXRequest *requestUnderTest = [[PXRequest alloc] initWithURLRequest:dummyURLRequest completion:nil];
id mockConnection = [OCMockObject niceMockForClass:[NSURLConnection class]];
[[mockConnection expect] start];
id partialRequestMock = (PXRequest *)[OCMockObject partialMockForObject:requestUnderTest];
[[[partialRequestMock stub] andReturn:mockConnection] urlConnectionForURLRequest:OCMOCK_ANY];
[partialRequestMock start];
[mockConnection verify];
A Simple Test
A lot of Code
Slide 39
Slide 39 text
Why?
Slide 40
Slide 40 text
Because OCMock is
OLD and BUSTED
Slide 41
Slide 41 text
New Hotness
Kiwi
Slide 42
Slide 42 text
Integrates
Xcode
with
Slide 43
Slide 43 text
No content
Slide 44
Slide 44 text
describe(@"ClassName", ^{
context(@"a state the component is in", ^{
__block id variable = nil;
it(@"should do something", ^{
[[variable should] meetSomeExpectation];
});
specify(^{
[variable shouldNotBeNil]
});
});
});
Slide 45
Slide 45 text
describe(@"ClassName", ^{
context(@"a state the component is in", ^{
__block id variable = nil;
beforeAll(^{ // Occurs once
});
afterAll(^{ // Occurs once
});
beforeEach(^{ // Occurs before each enclosed "it"
variable = [MyClass instance];
});
afterEach(^{ // Occurs after each enclosed "it"
});
});
});
Slide 46
Slide 46 text
VIOUR DRIVEN DEVELOPMENT
BEHAVIOUR DRIVEN DEVELOPMENT
R DRIVEN DEVELOPMENTBEHAVIOUR D
BEHAVIOU
BEHAVIOUR DRIVEN DEVEL
BEHAVIOUR DRIVEN DEVELOPMENT
VELOPMENT
NT
DEVELOPMENT
NT
BEHAVIOUR DRIVEN DEV
UR DRIVEN DEVELOPMENTBEHAVIOUR
BEHAVIOUR DRIVEN DEVELOPMENTBEH
Slide 47
Slide 47 text
GTFO.
UAT?
Slide 48
Slide 48 text
SOURCE
OPEN
Slide 49
Slide 49 text
INSULAR
Objective-C Developers Tend to be
(probably historical)