1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
// Copyright 2009 Alp Toker <alp@atoker.com>
// This software is made available under the MIT License
// See COPYING for details
using System;
using System.Collections.Generic;
using NUnit.Framework;
using DBus;
using DBus.Authentication;
namespace DBus.Tests
{
[TestFixture]
public class AuthenticationTest
{
[Test]
public void AuthSelf ()
{
SaslServer server = new SaslServer ();
SaslClient client = new SaslClient ();
server.Peer = client;
client.Peer = server;
client.Identity = "1000";
server.Guid = UUID.Generate ();
Assert.IsTrue (client.AuthenticateSelf ());
Assert.AreEqual (server.Guid, client.ActualId);
}
}
}
|