Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

22 lines
777 B
C#

// Copyright (c) Microsoft Corporation. All rights reserved. See License.txt in the project root for license information.
namespace System.Web.Helpers.AntiXsrf.Test
{
// An IAntiForgeryTokenSerializer that can be passed to MoQ.
public abstract class MockableAntiForgeryTokenSerializer : IAntiForgeryTokenSerializer
{
public abstract object Deserialize(string serializedToken);
public abstract string Serialize(object token);
AntiForgeryToken IAntiForgeryTokenSerializer.Deserialize(string serializedToken)
{
return (AntiForgeryToken)Deserialize(serializedToken);
}
string IAntiForgeryTokenSerializer.Serialize(AntiForgeryToken token)
{
return Serialize(token);
}
}
}