public static void TestAuthChallengeMsg_GetChallenge_NotZeros() { var challengeMsg = new AuthChallengeMsg(); var challenge = challengeMsg.GetChallenge(); Assert.AreNotEqual(new byte[PHRASE_SIZE], challenge); }
public static void TestAuthChallengeMsg_GetChallenge_NotNull() { var challengeMsg = new AuthChallengeMsg(); var challenge = challengeMsg.GetChallenge(); Assert.NotNull(challenge); }
public static void TestAuthChallengeMsg_GetChallenge_CorrectSize() { var challengeMsg = new AuthChallengeMsg(); var challenge = challengeMsg.GetChallenge(); Assert.AreEqual(PHRASE_SIZE, challenge.Length); }
public static void TestAuthChallengeMsg_ToByteArray_ContainsChallenge() { var challengeMsg = new AuthChallengeMsg(); var challenge = challengeMsg.GetChallenge(); var packet = challengeMsg.ToByteArray(); var packetChallenge = new byte[PHRASE_SIZE]; Buffer.BlockCopy(packet, PHRASE_LOCATION, packetChallenge, 0, PHRASE_SIZE); Assert.AreEqual(challenge, packetChallenge); }
public static void TestAuthChallengeMsg_GetChallenge_DoesNotThrow() { var challengeMsg = new AuthChallengeMsg(); Assert.DoesNotThrow(() => challengeMsg.GetChallenge()); }