示例#1
0
        public async Task UploadAlbum_WithNoUrls_ShouldRetunNoUpdates()
        {
            var options = new DbContextOptionsBuilder <ApplicationDbContext>()
                          .UseInMemoryDatabase(databaseName: Guid.NewGuid().ToString()).Options;

            var repository = new EfDeletableEntityRepository <ApplicationUser>(new ApplicationDbContext(options));
            var imageRepo  = new EfDeletableEntityRepository <UserImage>(new ApplicationDbContext(options));

            var service = new ModelService.ModelService(repository, null, imageRepo, null);

            var user1 = await this.CreateUserAsync($"*****@*****.**", "Pesho", "Peshev", repository);

            var listUrls = new List <string>
            {
            };
            var count = await service.UploadAlbum(listUrls, user1);

            Assert.Equal(0, count);
        }