             XCTAssertEqual(error.code, 100, "\(error)")
             expectation.fulfill()
         }
-        promise.failure(self.error)
-        waitForExpectationsWithTimeout(2) {error in
-            XCTAssertNil(error, "\(error)")
-        }
-    }
-    
-}
-
+        promise.failure(TestFailure.error)
+        waitForExpectationsWithTimeout(2) {error in
+            XCTAssertNil(error, "\(error)")
+        }
+    }
+    
+}
+
+class FutureCompleteTests : XCTestCase {
+  
+    override func setUp() {
+        super.setUp()
+    }
+    
+    override func tearDown() {
+        super.tearDown()
+    }
+    
+    func testImmediateSuccess() {
+        let future = Future<Bool>()
+        let expectationOnComlpete = expectationWithDescription("Immediate onComplete fullfilled")
+        let expectationOnSuccess = expectationWithDescription("Immediate onSuccess fullfilled")
+        future.complete(Try(true))
+        future.onComplete {result in
+            switch result {
+            case .Success(let resultWrapper):
+                XCTAssert(resultWrapper.value, "Invalid value")
+                expectationOnComlpete.fulfill()
+            case .Failure(let error):
+                XCTAssert(false, "Failure value")
+            }
+        }
+        future.onSuccess {value in
+            XCTAssert(value, "onSuccess value invalid")
+            expectationOnSuccess.fulfill()
+        }
+        future.onFailure {error in
+            XCTAssert(false, "onFailure called")
+        }
+        waitForExpectationsWithTimeout(2) {error in
+            XCTAssertNil(error, "\(error)")
+        }
+    }
+    
+    func testImmediateFailure() {
+        let future = Future<Bool>()
+        let excpectationOnComplete = expectationWithDescription("Immediate onComplete fullfilled")
+        let excpectationOnFailure = expectationWithDescription("Immediate onFailure fullfilled")
+        future.failure(TestFailure.error)
+        waitForExpectationsWithTimeout(2) {error in
+            XCTAssertNil(error, "\(error)")
+        }
+    }
+    
+    func testDelayedSuccess() {
+        
+    }
+    
+    func testDelayedFailure() {
+        
+    }
+    
+    func testImmediateAndDelayedSuccess() {
+        
+    }
+    
+    func testImmediateAndDelayedFailure() {
+    
+    }
+    
+    func testPromiseSuccess() {
+        
+    }
+    
+    func testPromiseFailure() {
+        
+    }
+}
+

        future.success(true)
        future.onSuccess {value in
            XCTAssertTrue(value, "Invalid value")
            expectation_delayed.fulfill()
        }
        waitForExpectationsWithTimeout(2) {error in
            XCTAssertNil(error, "\(error)")


    func testImmediateAndDelayed() {
        let future = Future<Bool>()
        let expectationImmediate = expectationWithDescription("Immediate future success")
        let expectationDelayed = expectationWithDescription("Delayed future success")
        future.onSuccess {value in
            XCTAssertTrue(value, "Invalid value")
            expectationImmediate.fulfill()
        }
        future.onFailure {error in
            XCTAssert(false, "onFailure called")
