public void RegularAuthenticationTest() { var authResult = RabbitAuth.GetAuthType("*****@*****.**", "testpassword"); Assert.AreEqual(AuthenticationType.Regular, authResult); var authResultLongEmail = RabbitAuth.GetAuthType("*****@*****.**", "testpass"); Assert.AreEqual(AuthenticationType.Regular, authResultLongEmail); }
public void MousebreakerAuthenticationTest() { var authResult = RabbitAuth.GetAuthType("*****@*****.**", "cHJvY2Vzc29yX3dpbGxfbmV2ZXJfZmluZF90aGlzX211YWhhaGFfd2VsbF9tYXliZV9oZV93aWxsX2J1dF9pXw=="); Assert.AreEqual(AuthenticationType.Mousebreaker, authResult); var invalidEmail = RabbitAuth.GetAuthType("testinvalidemailexample.com", "cHJvY2Vzc29yX3dpbGxfbmV2ZXJfZmluZF90aGlzX211YWhhaGFfd2VsbF9tYXliZV9oZV93aWxsX2J1dF9pXw=="); Assert.AreNotEqual(AuthenticationType.Mousebreaker, invalidEmail); }
public void NullAuthenticationTest() { AuthenticationException expectedException = null; try { RabbitAuth.GetAuthType(null, null); } catch (AuthenticationException ex) { expectedException = ex; } Assert.IsNotNull(expectedException); }
public void InvalidAuthenticationTest() { InvalidOperationException expectedException = null; try { RabbitAuth.GetAuthType("47823", "notahexadecimalstringohno"); } catch (InvalidOperationException ex) { expectedException = ex; } Assert.IsNull(expectedException); }
public void FacebookAuthenticationTest() { var authResult = RabbitAuth.GetAuthType(null, "TcsL8qdSwvzDqudWGfYEGF5RrBLBSanHW78t5Z87ngKzUDdhCE4Jbtq6Vrwk2vuVS8WW2RYT54hwFxchWywLLvQaUyA2k2fanfAs"); Assert.AreEqual(AuthenticationType.Facebook, authResult); }
public void ArmorGamesAuthenticationTest() { var authResult = RabbitAuth.GetAuthType("ee6ab941d09050400c4f916dbb47aad8", "23b9a5088c3c940f82945b6f3df80abc"); Assert.AreEqual(AuthenticationType.ArmorGames, authResult); }
public void KongregateAuthenticationTest() { var authResult = RabbitAuth.GetAuthType("123456", "969ad76abf19b5c3e5917321e659abe6d8d6f3aba73e5158863c3b4159c00366"); Assert.AreEqual(AuthenticationType.Kongregate, authResult); }