using System.Security.Principal; using Quadarax.Foundation.Core.Data.Interface.Domain; namespace Quadarax.Application.QLiberace.Base.Tests.Services.Fakes { public class ContextFake : IContext { public IPrincipal CurrentUser { get; } public ContextFake() { var genericIdentity = new GenericIdentity("genericIdentity"); CurrentUser = new GenericPrincipal(genericIdentity, new string[] { }); } public ContextFake(IPrincipal currentUser) { CurrentUser = currentUser; } public TContext GetContext() where TContext : IContext { return (TContext)(IContext) this; } } }