Create a Mock Facebook LoginManager for unit testing

已关闭 已发布的 5 年前 货到付款
已关闭 货到付款

I need a Mock Facebook LoginManager for unit testing.

I want to be able to initialise it with the type of test outcome that I want:

public enum MockResult {

case successNoDeclined

case successPublicProfileDeclined

case successEmailDeclined

case successUserFriendsDeclined

case successUserHometownDeclined

case cancelled

case failed

}

The function and args need to be the same as the LoginManager Class, so I can use dependancy injection to test my code:

public func logIn(readPermissions: [ReadPermission] = [.publicProfile], viewController: UIViewController? = nil, completion: ((LoginResult) -> Void)? = nil)

Facebook API iPhone Objective C Swift

项目ID: #18084597

关于项目

1个方案 远程项目 活跃的5 年前

1 威客就此工作平均出价 $30

YATISHAGRAWAL

Hi there, Greetings !!! How are you?? I am interested in your project and would like to discuss the project with you. I have more than 7 years experience in iOS and I have integrated facebook login and sharing i 更多

$30AUD 在1天里
(5条评论)
3.0