public async Task Create_UserNotFound_Test()
        {
            //Arrange
            SetUpMockRepositories(1, null, It.IsAny <CatCreateInDbModel>());

            var service = new CatCRUDService(
                mockCatDatabase.Object,
                mockCatSharingDatabase.Object,
                mockUserDatabase.Object,
                mockMapper.Object);

            //Action
            ServiceResult <CatServiceModel> actualResult = await service.CreateAsync(catCreateServiceModel, claims);

            var expectedResult = new ServiceResult <CatServiceModel>(ServiceResultStatus.ItemNotFound, "User is not found");

            //Assert
            Assert.AreEqual(expectedResult.Status, actualResult.Status);
            Assert.AreEqual(expectedResult.Message, actualResult.Message);
        }
        public async Task Create_Success_Test()
        {
            //Arrange
            SetUpMockRepositories(1, user, It.IsAny <CatCreateInDbModel>());

            var service = new CatCRUDService(
                mockCatDatabase.Object,
                mockCatSharingDatabase.Object,
                mockUserDatabase.Object,
                mockMapper.Object);

            //Action
            ServiceResult <CatServiceModel> actualResult = await service.CreateAsync(catCreateServiceModel, claims);

            var expectedResult = new ServiceResult <CatServiceModel>(ServiceResultStatus.ItemCreated, catServiceModel);

            //Assert
            Assert.AreEqual(expectedResult.Status, actualResult.Status);
            Assert.AreEqual(expectedResult.ReturnedObject.Id, actualResult.ReturnedObject.Id);
        }
        public async Task Create_Forbidden_Test()
        {
            //Arrange
            SetUpMockRepositories(1, user, It.IsAny <CatCreateInDbModel>());

            var claims = new List <Claim>
            {
                new Claim(ClaimTypes.NameIdentifier, "111"),
                new Claim(ClaimsIdentity.DefaultRoleClaimType, "1")
            };

            var service = new CatCRUDService(
                mockCatDatabase.Object,
                mockCatSharingDatabase.Object,
                mockUserDatabase.Object,
                mockMapper.Object);

            ServiceResult <CatServiceModel> actualResult = await service.CreateAsync(catCreateServiceModel, claims);

            var expectedResult = new ServiceResult <CatServiceModel>(ServiceResultStatus.ActionNotAllowed);

            Assert.AreEqual(expectedResult.Status, actualResult.Status);
        }