コード例 #1
0
        public void SetUp()
        {
            _employeeStub = new List <Employee>();
            _employeeStub.Add(EmployeeProvider.GetOneTestEmployee());
            _employeesStub = EmployeeProvider.GetAllTestEmployees();

            _mockAuthService = new Mock <IAuthenticationService>();
            _mockRepository  = new Mock <IEmployeeRepository>();
            _mockService     = new Mock <IPaginationService>();

            _mockService
            .Setup(s => s.Page)
            .Returns(1);
            _mockService
            .Setup(s => s.PageSize)
            .Returns(10);

            _user = new ClaimsPrincipal(new ClaimsIdentity(new Claim[]
            {
                new Claim(ClaimTypes.Name, "Alice"),
                new Claim(ClaimTypes.NameIdentifier, "1"),
            }, "mock"));
        }