public async Task EditAsync_ShouldWorkCorrectly()
        {
            // Arrange
            var context = ApplicationDbContextInMemoryFactory.InitializeContext();
            var seeder  = new HotelsServiceTestsSeeder();
            await seeder.SeedHotelAsync(context);

            var hotelRepository = new EfDeletableEntityRepository <Hotel>(context);

            var service = new HotelsService(hotelRepository);
            var hotel   = hotelRepository.All().First();
            var model   = new HotelViewModel
            {
                Id                     = hotel.Id,
                Name                   = hotel.Name,
                ImageUrl               = hotel.ImageUrl,
                Description            = hotel.Description,
                Address                = hotel.Address,
                DestinationId          = hotel.DestinationId,
                PricePerNightPerPerson = hotel.PricePerNightPerPerson,
                Stars                  = hotel.Stars,
                AvailableRooms         = hotel.AvailableRooms,
                FeedingType            = hotel.FeedingType,
                ReservationType        = hotel.ReservationType,
            };

            model.Name     = "EditedHotelName";
            model.ImageUrl = "EditedImageUrl";
            model.PricePerNightPerPerson = 50;
            model.ReservationType        = ReservationType.Hotel;
            model.Description            = "EditedDescription";
            model.Address        = "EditedAddress";
            model.DestinationId  = 1;
            model.Stars          = 1;
            model.AvailableRooms = 2;
            model.FeedingType    = FeedingType.HalfBoard;

            // Act
            await service.EditAsync(model.Id, model);

            var actualResult   = hotelRepository.All().First();
            var expectedResult = model;

            // Assert
            Assert.True(expectedResult.Name == actualResult.Name);
            Assert.True(expectedResult.ImageUrl == actualResult.ImageUrl);
            Assert.True(expectedResult.Description == actualResult.Description);
            Assert.True(expectedResult.ReservationType == actualResult.ReservationType);
            Assert.True(expectedResult.PricePerNightPerPerson == actualResult.PricePerNightPerPerson);
            Assert.True(expectedResult.Address == actualResult.Address);
            Assert.True(expectedResult.AvailableRooms == actualResult.AvailableRooms);
            Assert.True(expectedResult.Stars == actualResult.Stars);
            Assert.True(expectedResult.FeedingType == actualResult.FeedingType);
            Assert.True(expectedResult.DestinationId == actualResult.DestinationId);
        }
        public async Task IsExistingMethod_ShouldReturnFalseIfFlightNotExists()
        {
            // Arrange
            var context = ApplicationDbContextInMemoryFactory.InitializeContext();
            var seeder  = new HotelsServiceTestsSeeder();
            await seeder.SeedHotelAsync(context);

            var hotelRepository = new EfDeletableEntityRepository <Hotel>(context);

            var service = new HotelsService(hotelRepository);

            // Act
            var actualResult   = service.Exists(2);
            var expectedResult = false;

            // Assert
            Assert.True(actualResult == expectedResult);
        }
        public async Task DeleteAsync_ShouldSuccessfullyDelete()
        {
            // Arrange
            var context = ApplicationDbContextInMemoryFactory.InitializeContext();
            var seeder  = new HotelsServiceTestsSeeder();
            await seeder.SeedHotelAsync(context);

            var hotelRepository = new EfDeletableEntityRepository <Hotel>(context);

            var service = new HotelsService(hotelRepository);
            var hotelId = hotelRepository.All().First().Id;

            // Act
            var hotelsCount = hotelRepository.All().Count();
            await service.DeleteAsync(hotelId);

            var actualResult   = hotelRepository.All().Count();
            var expectedResult = hotelsCount - 1;

            // Assert
            Assert.True(actualResult == expectedResult);
        }