aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/main.mm13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/main.mm b/tests/main.mm
index 87f44fa4..a47bf2a7 100644
--- a/tests/main.mm
+++ b/tests/main.mm
@@ -12,6 +12,7 @@
#include <unicode/uclean.h>
#include <unicode/ucnv.h>
#include <mailcore/mailcore.h>
+#import "MCOFetchFoldersOperation.h"
extern "C" {
extern int mailstream_debug;
@@ -279,24 +280,26 @@ void testObjc()
session.port = 993;
session.connectionType = MCOConnectionTypeTLS;
- [session checkAccount:^(NSError *err, MCOOperation *op, id response) {
+ MCOCheckAccountOperation *checkOp = [session checkAccountOperation];
+ [checkOp start:^(NSError *err) {
if (err) {
NSLog(@"Oh crap, an error %@", err);
} else {
NSLog(@"CONNECTED");
}
}];
-
- [session fetchAllFolders:^(NSError *err, MCOOperation *op, id response) {
+
+ MCOFetchFoldersOperation *foldersOp = [session fetchAllFoldersOperation];
+ [foldersOp start:^(NSError *err, NSArray *folders) {
if (err) {
NSLog(@"Oh crap, an error %@", err);
} else {
- NSLog(@"Folder %@", response);
+ NSLog(@"Folder %@", folders);
}
}];
[[NSRunLoop currentRunLoop] run];
- [session release];
+ [session autorelease];
}