Beispiel #1
0
        public void Given_Valid_Arguments_When_I_Call_GetRoles_Then_The_Correct_List_Of_Roles_Are_Returned()
        {
            //arrange
            var roleMock = new Mock <IRole>();
            var roles    = new List <IRole> {
                roleMock.Object
            };

            _roleServiceMock.Setup(r => r.GetRoles(_connectionModel)).Returns(roles);

            //act
            var result = _sut.GetRoles();

            //assert
            Assert.AreSame(roles, result);
        }
        public IEnumerable <UserRoleDto> GetUserRoles()
        {
            var roles = _blaiseApi.GetRoles();

            return(_dtoMapper.MapToUserRoleDtos(roles));
        }