File: AuthenticationTest.cs

package info (click to toggle)
dbus-sharp 0.8.1-2.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 868 kB
  • sloc: cs: 7,690; sh: 494; makefile: 181
file content (32 lines) | stat: -rw-r--r-- 662 bytes parent folder | download | duplicates (3)
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);
		}
	}
}