Tuesday, July 15, 2014

[iOS] Unit Test Frameworks

Apple provide its default test framework XCTestCase, but it's hard to use it to test async / block /delegate / protocol methods.

Here are some open source tools which can help you do everything as you want:
  • OCMockito - https://github.com/jonreid/OCMockito
    It's easy to mock any object, protocol can also be mocked, but can't handle the async methods.
  • Expecta - https://github.com/specta/expecta
    It provides powerful matchers and easy to use.
  • Aspects - https://github.com/steipete/Aspects
    Just like the name, you can do something before or after the methods or replace the methods' implementation.
  • Kiwi - https://github.com/kiwi-bdd/Kiwi
    It's very very powful to do asynchronous testing, stub methods to capture any methods' parameter, protocol mock and handle any you want to do.

    Kiwi docs  - https://github.com/kiwi-bdd/Kiwi/wiki

Wednesday, July 2, 2014

[JAVA]How to fix PIX Exception - HTTPS issue

Go to  /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/security

java InstallCert DOMAIN_NAME
eg:  java InstallCert 1800tao.com