espagram/Espagram/Lesson+Test.m
2012-11-23 23:06:49 +01:00

34 lines
821 B
Objective-C

//
// Lesson+Test.m
// Espagram
//
// Created by Abel Fokkinga on 11/15/12.
// Copyright (c) 2012 Abel Fokkinga. All rights reserved.
//
#import "Lesson+Conjugator.h"
#import "Lesson+Test.h"
#import "Conjugator.h"
#import "NSMutableArray_Shuffling.h"
@implementation Lesson (Test)
- (NSArray *) testableVerbs;
{
NSMutableArray *testableVerbs = [[NSMutableArray alloc] init];
for ( NSString *person in [[self getConjugationEngine] personsKeys]) {
for ( Verb *verb in self.verbs.allObjects) {
TestableVerb * testableVerb = [[TestableVerb alloc] init];
testableVerb.verb = verb;
testableVerb.person = person;
[testableVerbs addObject:testableVerb];
}
}
// shuffle list
[testableVerbs shuffle];
return testableVerbs;
}
@end