Сборка продукта выполнена успешно, но тест не пройден.Как передать ошибку несоответствия типов, указанную в строке с STAssertEquals
ниже?
// TransactionSpec.m
#import "Transaction.h"
@interface TransactionSpec : SenTestCase
@end
@implementation TransactionSpec
#pragma mark Properties
- (void)testProperties {
Transaction *transaction = [[Transaction alloc] init];
transaction.type = TransactionTypePay;
STAssertNotNil(transaction, @"transaction exists");
STAssertEquals(transaction.type, TransactionTypePay, @"type property works"); // Type mismatch
}
@end
// Transaction.h
typedef enum {
TransactionTypePay,
TransactionTypeCharge
} TransactionType;
@interface Transaction : NSObject
@property (nonatomic) TransactionType *type;
@end
// Transaction.m
#import "Transaction.h"
@implementation Transaction
@synthesize type;
@end