summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.Test/OpenId/ProviderEndpointDescriptionTests.cs
blob: f406f0e0574be12f0db68d4ac322f59c8cf44537 (plain)
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
//-----------------------------------------------------------------------
// <copyright file="ProviderEndpointDescriptionTests.cs" company="Outercurve Foundation">
//     Copyright (c) Outercurve Foundation. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

namespace DotNetOpenAuth.Test.OpenId {
	using System;
	using DotNetOpenAuth.Messaging;
	using DotNetOpenAuth.OpenId;
	using DotNetOpenAuth.OpenId.Extensions.SimpleRegistration;
	using DotNetOpenAuth.OpenId.Messages;
	using NUnit.Framework;

	[TestFixture]
	public class ProviderEndpointDescriptionTests : OpenIdTestBase {
		[Test]
		public void NonNullCapabilities() {
			var epd = new ProviderEndpointDescription(OPUri, Protocol.Default.Version);
			Assert.IsNotNull(epd.Capabilities);
		}

		[Test, ExpectedException(typeof(ProtocolException))]
		public void ProtocolDetectionWithoutClues() {
			new ProviderEndpointDescription(OPUri, new[] { Protocol.V20.HtmlDiscoveryLocalIdKey }); // random type URI irrelevant to detection
		}
	}
}