I am using ConnectorAPIHelper to post Chatter notification from apex code.When I run my apex test class it giving this exception :
System.UnsupportedOperationException: ConnectApi methods are not supported in data siloed tests. Please use @IsTest(SeeAllData=true).
It seems in order to cover the class that use ChatterApi, the test class need to be SeeAllData=true .
In my case, because I only have one line method that call ChatterApi , I think it's better use Test.isRunningTest instead of SeeAllData=true.
More info please refer here .