public async Task AddFinishedModel_WithCorrectData_ShouldSuccessfullyAdd()
        {
            // Arrange
            var context = ApplicationDbContextInMemoryFactory.InitializeContext();

            var groupRepository      = new EfDeletableEntityRepository <Product_Group>(context);
            var productRepository    = new EfDeletableEntityRepository <Product>(context);
            var accessorieRepository = new EfDeletableEntityRepository <Accessorie>(context);

            var groupService      = new GroupService(groupRepository);
            var prodcutService    = new ProductService(productRepository, groupService);
            var cloudinaryService = new FakeCloudinary();
            var accessorieService = new AccessoriesService(accessorieRepository, prodcutService, groupService, cloudinaryService);

            var seeder = new DbContextTestsSeeder();
            await seeder.SeedUsersAsync(context);

            await seeder.SeedGroupAsync(context);

            var user = new ApplicationUser
            {
                Id             = "abc",
                FirstName      = "Nikolay",
                LastName       = "Doychev",
                Email          = "*****@*****.**",
                EmailConfirmed = true,
            };

            var       fileName = "Img";
            IFormFile file     = new FormFile(
                new MemoryStream(Encoding.UTF8.GetBytes("This is a dummy file")),
                0,
                0,
                fileName,
                "dummy.png");

            var accessorie = new AddAccessorieInputModel
            {
                Id          = "abc1",
                Description = "Some description test 1",
                ImagePath   = file,
                Name        = "Аксесоар 1",
            };

            // Act
            AutoMapperConfig.RegisterMappings(typeof(AddAccessorieInputModel).Assembly);
            var result = await accessorieService.AddAccessoriesAsync(accessorie, user.Id.ToString());

            var actual = context.Accessories.FirstOrDefault(x => x.Product.Name == "Аксесоар 1");

            var expectedName        = "Аксесоар 1";
            var expectedDescription = "Some description test 1";

            // Assert
            AssertExtension.EqualsWithMessage(expectedName, actual.Product.Name, string.Format(ErrorMessage, "AddAccessorie returns correct Name"));
            AssertExtension.EqualsWithMessage(expectedDescription, actual.Description, string.Format(ErrorMessage, "AddAccessorie returns correct Description"));
        }
        public async Task AddProject_WithNullValue_ShouldThrowException()
        {
            // Arrange
            var context = ApplicationDbContextInMemoryFactory.InitializeContext();

            var groupRepository      = new EfDeletableEntityRepository <Product_Group>(context);
            var productRepository    = new EfDeletableEntityRepository <Product>(context);
            var accessorieRepository = new EfDeletableEntityRepository <Accessorie>(context);

            var groupService      = new GroupService(groupRepository);
            var prodcutService    = new ProductService(productRepository, groupService);
            var cloudinaryService = new FakeCloudinary();
            var accessorieService = new AccessoriesService(accessorieRepository, prodcutService, groupService, cloudinaryService);

            var user = new ApplicationUser
            {
                Id             = "abc",
                FirstName      = "Nikolay",
                LastName       = "Doychev",
                Email          = "*****@*****.**",
                EmailConfirmed = true,
            };

            var       fileName = "Img";
            IFormFile file     = new FormFile(
                new MemoryStream(Encoding.UTF8.GetBytes("This is a dummy file")),
                0,
                0,
                fileName,
                "dummy.png");

            var accessorie = new AddAccessorieInputModel
            {
                Id          = "abc1",
                Description = "Some description test 1",
                Name        = "Аксесоар 1",
            };

            var seeder = new DbContextTestsSeeder();
            await seeder.SeedUsersAsync(context);

            await seeder.SeedGroupAsync(context);

            // Act
            AutoMapperConfig.RegisterMappings(typeof(AddAccessorieInputModel).Assembly);
            await Assert.ThrowsAsync <ArgumentNullException>(() => accessorieService.AddAccessoriesAsync(accessorie, user.Id.ToString()));
        }