Test: - CPPasteboard setString:forType: and stringForType:.

This commit is contained in:
Alexander Ljungberg
2013-05-14 14:40:41 -07:00
parent 3fb0dd725a
commit f2d9ef7720
+17
View File
@@ -0,0 +1,17 @@
@import <AppKit/CPPasteboard.j>
@import <OJUnit/OJTestCase.j>
@implementation CPPasteboardTest : OJTestCase
{
}
- (void)testSetString_forType_
{
var pboard = [CPPasteboard generalPasteboard];
[pboard declareTypes:@[CPStringPboardType] owner:nil];
[pboard setString:@"hello" forType:CPStringPboardType];
[self assert:@"hello" equals:[pboard stringForType:CPStringPboardType]];
}
@end