Пример #1
0
        public void Topic_ShouldInsertOK()
        {
            var          context         = new LearningContext();
            var          topicRepository = new TopicRepository(context);
            List <Topic> topics          = new List <Topic> {
                new Topic {
                    Name = "Entity Framework", Description = "Entity Framework courses for everyone"
                },
                new Topic {
                    Name = "Bootstrap", Description = "Bootstrap courses for everyone"
                },
                new Topic {
                    Name = "JQuery", Description = "JQuery courses for everyone"
                },
                new Topic {
                    Name = "JavaScript", Description = "JavaScript courses for everyone"
                }
            };


            topicRepository.InsertRange(topics);

            context.SaveChanges();
            Assert.IsFalse(false);
        }