Create a Mock Facebook LoginManager for unit testing

Imefungwa Ilichapishwa Miaka 5 iliyopita Kulipwa wakati wa kujifungua
Imefungwa Kulipwa wakati wa kujifungua

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

Kitambulisho cha Mradi: #18084597

Kuhusu mradi

Pendekezo 1 Mradi wa mbali Ipo mtandaoni %project.latestActivity_relativeTime|badilisha%

Wafanyakazi huru 1 wanaweka zabuni ya kadri ya $30 kwenye kazi hii

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 Zaidi

$30 AUD kwa siku 1
(Maoni 5)
3.0