public void Authenticator_InitialResponse_With_DseAuthenticator_Should_Return_Mechanism() { var authProvider = new DsePlainTextAuthProvider("u", "p"); authProvider.SetName(DseAuthenticatorName); var authenticator = authProvider.NewAuthenticator(null); CollectionAssert.AreEqual(Encoding.UTF8.GetBytes("PLAIN"), authenticator.InitialResponse()); }
public void Authenticator_InitialResponse_With_Other_Authenticator_Should_Return_Credentials() { var authProvider = new DsePlainTextAuthProvider("u", "p"); authProvider.SetName("org.other.authenticator"); var authenticator = authProvider.NewAuthenticator(null); CollectionAssert.AreEqual( new byte[] { 0, Encoding.UTF8.GetBytes("u")[0], 0, Encoding.UTF8.GetBytes("p")[0] }, authenticator.InitialResponse()); }