Skip to content
This repository
Fetching contributors…

Cannot retrieve contributors at this time

file 31 lines (26 sloc) 1.096 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
//
// GBTemplateVariablesProvider-CommonTesting.m
// appledoc
//
// Created by Tomaz Kragelj on 1.10.10.
// Copyright (C) 2010 Gentle Bytes. All rights reserved.
//

#import "GBApplicationSettingsProvider.h"
#import "GBHTMLTemplateVariablesProvider.h"
#import "GBTokenizer.h"

@interface GBTemplateVariablesProviderCommonTesting : GHTestCase
@end

@implementation GBTemplateVariablesProviderCommonTesting

- (void)testVariablesForClass_shouldPrepareDefaultVariables {
// setup
GBHTMLTemplateVariablesProvider *provider = [GBHTMLTemplateVariablesProvider providerWithSettingsProvider:[GBTestObjectsRegistry realSettingsProvider]];
GBClassData *class = [GBClassData classDataWithName:@"Class"];
// execute
NSDictionary *vars = [provider variablesForClass:class withStore:[GBTestObjectsRegistry store]];
// verify - just basic tests...
assertThat([vars objectForKey:@"page"], isNot(nil));
assertThat([vars valueForKeyPath:@"page.title"], isNot(nil));
assertThat([vars valueForKeyPath:@"page.specifications"], isNot(nil));
assertThat([vars objectForKey:@"object"], is(class));
}

@end
Something went wrong with that request. Please try again.