public async Task CreateSuccessfullyAddsNewSkill() { AutoMapperInitializer.InitializeMapper(); var context = InMemoryDbContextInitializer.InitializeContext(); var repository = new EfDeletableEntityRepository <Skill>(context); var service = new SkillsService(repository); var model = new CreateViewModel { Name = "New Skill", IsDeleted = true, }; int id = await service.CreateAsync(model); Assert.NotEqual(-1, id); Assert.Equal(1, context.Skills.IgnoreQueryFilters().Count()); }