Sha256: 95c4b17cbc507a0e7527a209c0cca4cc2e1c1edc217c8da9070e2e33766a3b66
Contents?: true
Size: 918 Bytes
Versions: 396
Compression:
Stored size: 918 Bytes
Contents
#import <XCTest/XCTest.h> #if __has_include("HelloWorldExample.h") # import "HelloWorldExample.h" # else # import "HelloWorld.h" #endif NS_ASSUME_NONNULL_BEGIN @interface HelloWorldTest : XCTestCase @end @implementation HelloWorldTest - (HelloWorld *)helloWorld { return [[HelloWorld alloc] init]; } - (void)testNoName { NSString *input = nil; NSString *expected = @"Hello, World!"; NSString *result = [[self helloWorld] hello:input]; XCTAssertEqualObjects(expected, result); } - (void)testSampleName { NSString *input = @"Alice"; NSString *expected = @"Hello, Alice!"; NSString *result = [[self helloWorld] hello:input]; XCTAssertEqualObjects(expected, result); } - (void)testOtherSampleName { NSString *input = @"Bob"; NSString *expected = @"Hello, Bob!"; NSString *result = [[self helloWorld] hello:input]; XCTAssertEqualObjects(expected, result); } @end NS_ASSUME_NONNULL_END
Version data entries
396 entries across 396 versions & 1 rubygems