public async Task CreateProgramCategoryAsyncShouldCreateBlogCategorySuccessfully() { var options = new DbContextOptionsBuilder <MyCalisthenicAppDbContext>() .UseInMemoryDatabase(databaseName: Guid.NewGuid().ToString()) .Options; var dbContext = new MyCalisthenicAppDbContext(options); var categoriesService = new CategoriesService(dbContext, null); var categoryInputModel = new ProgramCategoryAdminCreateViewModel { Name = CategoryName, Description = CategoryDescription, }; await categoriesService.CreateProgramCategoryAsync(categoryInputModel); var actual = dbContext.ProgramCategories.FirstOrDefaultAsync(bc => bc.Name == CategoryName); Assert.Equal(actual.Result.Name, CategoryName); }