public async Task CreateAsync_given_vote_creates() { using (var connection = await CreateConnectionAsync()) using (var context = await CreateContextAsync(connection)) { var repository = new VoteRepository(context); var vote = new VoteDTO { EventStockId = 1, Score = 5 }; var created = await repository.CreateAsync(vote); var entity = await context.Votes.FindAsync(created); Assert.Equal(1, entity.EventStockId); Assert.Equal(5, entity.Score); } }