public static void TestAuthChallengeMsg_GetChallenge_NotNull() { var challengeMsg = new AuthChallengeMsg(); var challenge = challengeMsg.GetChallenge(); Assert.NotNull(challenge); }
public static void TestAuthChallengeMsg_ToByteArray_CorrectSize() { var challengeMsg = new AuthChallengeMsg(); var packet = challengeMsg.ToByteArray(); Assert.AreEqual(MESSAGE_SIZE, packet.Length); }
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_CorrectSize() { var challengeMsg = new AuthChallengeMsg(); var challenge = challengeMsg.GetChallenge(); Assert.AreEqual(PHRASE_SIZE, challenge.Length); }
public static void TestAuthChallengeMsg_ToByteArray_CorrectHeader() { var challengeMsg = new AuthChallengeMsg(); var packet = challengeMsg.ToByteArray(); Assert.AreEqual(PACKET_IDENTIFIER, packet[0]); }
public static void TestAuthChallengeMsg_ToByteArray_NotNull() { var challengeMsg = new AuthChallengeMsg(); var packet = challengeMsg.ToByteArray(); Assert.NotNull(packet); }
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_ToByteArray_DoesNotThrow() { var challengeMsg = new AuthChallengeMsg(); Assert.DoesNotThrow(() => challengeMsg.ToByteArray()); }
public static void TestAuthChallengeMsg_GetChallenge_DoesNotThrow() { var challengeMsg = new AuthChallengeMsg(); Assert.DoesNotThrow(() => challengeMsg.GetChallenge()); }