public MockIdentifier(Identifier wrappedIdentifier, MockHttpRequest mockHttpRequest, IEnumerable<IdentifierDiscoveryResult> endpoints)
			: base(wrappedIdentifier.OriginalString, false) {
			Contract.Requires<ArgumentNullException>(wrappedIdentifier != null);
			Contract.Requires<ArgumentNullException>(mockHttpRequest != null);
			Contract.Requires<ArgumentNullException>(endpoints != null);

			this.wrappedIdentifier = wrappedIdentifier;
			this.endpoints = endpoints;
			this.mockHttpRequest = mockHttpRequest;

			// Register a mock HTTP response to enable discovery of this identifier within the RP
			// without having to host an ASP.NET site within the test.
			mockHttpRequest.RegisterMockXrdsResponse(new Uri(wrappedIdentifier.ToString()), endpoints);
		}
Beispiel #2
0
		public MockIdentifier(Identifier wrappedIdentifier, MockHttpRequest mockHttpRequest, IEnumerable<IdentifierDiscoveryResult> endpoints)
			: base(wrappedIdentifier.OriginalString, false) {
			Requires.NotNull(wrappedIdentifier, "wrappedIdentifier");
			Requires.NotNull(mockHttpRequest, "mockHttpRequest");
			Requires.NotNull(endpoints, "endpoints");

			this.wrappedIdentifier = wrappedIdentifier;
			this.endpoints = endpoints;
			this.mockHttpRequest = mockHttpRequest;

			// Register a mock HTTP response to enable discovery of this identifier within the RP
			// without having to host an ASP.NET site within the test.
			mockHttpRequest.RegisterMockXrdsResponse(new Uri(wrappedIdentifier.ToString()), endpoints);
		}
        public MockIdentifier(Identifier wrappedIdentifier, MockHttpRequest mockHttpRequest, IEnumerable <IdentifierDiscoveryResult> endpoints)
            : base(wrappedIdentifier.OriginalString, false)
        {
            Requires.NotNull(wrappedIdentifier, "wrappedIdentifier");
            Requires.NotNull(mockHttpRequest, "mockHttpRequest");
            Requires.NotNull(endpoints, "endpoints");

            this.wrappedIdentifier = wrappedIdentifier;
            this.endpoints         = endpoints;
            this.mockHttpRequest   = mockHttpRequest;

            // Register a mock HTTP response to enable discovery of this identifier within the RP
            // without having to host an ASP.NET site within the test.
            mockHttpRequest.RegisterMockXrdsResponse(new Uri(wrappedIdentifier.ToString()), endpoints);
        }
Beispiel #4
0
        public MockIdentifier(Identifier wrappedIdentifier, MockHttpRequest mockHttpRequest, IEnumerable <IdentifierDiscoveryResult> endpoints)
            : base(wrappedIdentifier.OriginalString, false)
        {
            Contract.Requires <ArgumentNullException>(wrappedIdentifier != null);
            Contract.Requires <ArgumentNullException>(mockHttpRequest != null);
            Contract.Requires <ArgumentNullException>(endpoints != null);

            this.wrappedIdentifier = wrappedIdentifier;
            this.endpoints         = endpoints;
            this.mockHttpRequest   = mockHttpRequest;

            // Register a mock HTTP response to enable discovery of this identifier within the RP
            // without having to host an ASP.NET site within the test.
            mockHttpRequest.RegisterMockXrdsResponse(new Uri(wrappedIdentifier.ToString()), endpoints);
        }
        public MockIdentifier(Identifier wrappedIdentifier, MockHttpRequest mockHttpRequest, IEnumerable<ServiceEndpoint> endpoints)
            : base(false)
        {
            ErrorUtilities.VerifyArgumentNotNull(wrappedIdentifier, "wrappedIdentifier");
            ErrorUtilities.VerifyArgumentNotNull(mockHttpRequest, "mockHttpRequest");
            ErrorUtilities.VerifyArgumentNotNull(endpoints, "endpoints");

            this.wrappedIdentifier = wrappedIdentifier;
            this.endpoints = endpoints;
            this.mockHttpRequest = mockHttpRequest;

            // Register a mock HTTP response to enable discovery of this identifier within the RP
            // without having to host an ASP.NET site within the test.
            mockHttpRequest.RegisterMockXrdsResponse(new Uri(wrappedIdentifier.ToString()), endpoints);
        }