public void AddFoundedsTest() { List <FoundPost> listFound = null; bool eventCall = false; ParserRutor parser = new ParserRutor(); parser.FoundPostsReceived += delegate(object s, FoundPostArgs e) { listFound = e.FoundPosts; eventCall = true; }; parser.StartGetList(); CommonFunction.SleepTimer(12, ref eventCall); DataBaseControl db = new DataBaseControl(); int actual = db.AddFoundeds(listFound); Assert.IsNotNull(listFound); Assert.AreEqual(listFound.Count(), actual); }