public void Serializable() {
			var response = new Mock<IAuthenticationResponse>(MockBehavior.Strict);
			response.Setup(o => o.ClaimedIdentifier).Returns(VanityUri);
			response.Setup(o => o.FriendlyIdentifierForDisplay).Returns(VanityUri.AbsoluteUri);
			response.Setup(o => o.Status).Returns(AuthenticationStatus.Authenticated);
			response.Setup(o => o.Provider).Returns(new ProviderEndpointDescription(OPUri, Protocol.Default.Version));
			response.Setup(o => o.GetUntrustedCallbackArguments()).Returns(new Dictionary<string, string>());
			response.Setup(o => o.GetCallbackArguments()).Returns(new Dictionary<string, string>());
			var snapshot = new PositiveAuthenticationResponseSnapshot(response.Object);
			MemoryStream ms = new MemoryStream();
			IFormatter formatter = new BinaryFormatter();
			formatter.Serialize(ms, snapshot);
		}
Beispiel #2
0
        public void Serializable()
        {
            var response = new Mock <IAuthenticationResponse>(MockBehavior.Strict);

            response.Setup(o => o.ClaimedIdentifier).Returns(VanityUri);
            response.Setup(o => o.FriendlyIdentifierForDisplay).Returns(VanityUri.AbsoluteUri);
            response.Setup(o => o.Status).Returns(AuthenticationStatus.Authenticated);
            response.Setup(o => o.Provider).Returns(new ProviderEndpointDescription(OPUri, Protocol.Default.Version));
            response.Setup(o => o.GetUntrustedCallbackArguments()).Returns(new Dictionary <string, string>());
            response.Setup(o => o.GetCallbackArguments()).Returns(new Dictionary <string, string>());
            var          snapshot  = new PositiveAuthenticationResponseSnapshot(response.Object);
            MemoryStream ms        = new MemoryStream();
            IFormatter   formatter = new BinaryFormatter();

            formatter.Serialize(ms, snapshot);
        }