public void should_assign_id_to_the_created_entity_when_mapping_says_so()
        {
            var newsItem = new News {Title = "Major Headline"};

            _connection.Insert(newsItem);

            newsItem.Id.Should().Be(1);
        }
示例#2
0
        public void Insert(SQLiteConnection connection, int numberOfItems)
        {
            for (var i = 0; i < numberOfItems; i++)
            {
                var news = new News
                {
                    Title = "Headline " + i
                };

                News.Add(news);
                connection.Insert(news);
            }
        }