public async void CreateComponentTypeAsync_ShouldReturnTheCreatedComponentType_AndIncreaseTheComponentTypesCount() { var newComponentType = new ComponentType { Name = "PSU" }; var expectedNumberOfComponentTypes = DbContext.ComponentTypes.Count() + 1; var createdComponentType = await _componentTypeRepository.CreateAsync(newComponentType); Assert.NotNull(createdComponentType); Assert.Equal(newComponentType.Name, createdComponentType.Name); Assert.True(newComponentType.Id != 0); Assert.Equal(expectedNumberOfComponentTypes, DbContext.ComponentTypes.Count()); }