DotNetOpenAuth: Mock ClaimsResponse
Posted
by Pickels
on Stack Overflow
See other posts from Stack Overflow
or by Pickels
Published on 2010-04-12T20:12:43Z
Indexed on
2010/04/13
2:22 UTC
Read the original article
Hit count: 657
Hello,
I was wondering how I can mock the ClaimseReponse class in DotNetOpenAuth?
This is the class(remove a few properties):
[Serializable]
public sealed class ClaimsResponse : ExtensionBase,
IClientScriptExtensionResponse,
IExtensionMessage,
IMessageWithEvents,
IMessage
{
public static bool operator !=(ClaimsResponse one, ClaimsResponse other);
public static bool operator ==(ClaimsResponse one, ClaimsResponse other);
[MessagePart("email")]
public string Email { get; set; }
[MessagePart("fullname")]
public string FullName { get; set; }
public override bool Equals(object obj);
public override int GetHashCode();
}
This is what I tried:
ClaimsResponse MockCR = new ClaimsResponse();
MockCR.Email = "[email protected]";
MockCR.FullName = "Mister T";
I get the following error: '...ClaimsResponse(string)' is inaccessible due to its protection level.
Kind regards,
Pickels
© Stack Overflow or respective owner