mirror of https://github.com/abpframework/abp
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
859 B
28 lines
859 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using NSubstitute;
|
|
using Volo.Abp.Users;
|
|
|
|
namespace Volo.Abp.PermissionManagement
|
|
{
|
|
public class AbpPermissionManagementApplicationTestBase : PermissionManagementTestBase<AbpPermissionManagementApplicationTestModule>
|
|
{
|
|
protected Guid? CurrentUserId { get; set; }
|
|
|
|
protected AbpPermissionManagementApplicationTestBase()
|
|
{
|
|
CurrentUserId = Guid.NewGuid();
|
|
}
|
|
protected override void AfterAddApplication(IServiceCollection services)
|
|
{
|
|
var currentUser = Substitute.For<ICurrentUser>();
|
|
//currentUser.Id.Returns(ci => CurrentUserId);
|
|
currentUser.IsAuthenticated.Returns(true);
|
|
|
|
services.AddSingleton(currentUser);
|
|
}
|
|
}
|
|
}
|