public async Task CreateSizeAsync_WhenCalled_AddsObjectToList() { //Arrange _context .Setup(c => c.AddAsync(_newSize)) .Returns(async() => { return(await Task.Run(() => { return _newSize; })); }); //Act var result = await _sizeService.CreateSizeAsync(_newSize); //Assert _context.Verify(c => c.AddAsync(_newSize), Times.Once); }