public void Find_WhenObjectIsInDb_ShouldReturnObject()
        {
            //arrange
            var bug = this.GetValidTestBug();

            var dbContext = new BugLoggerDbContext();
            var repo = new DbBugsRepository(dbContext);

            dbContext.Bugs.Add(bug);
            dbContext.SaveChanges();

            //act
            var bugInDb = repo.Find(bug.Id);

            //asesrt

            Assert.IsNotNull(bugInDb);
            Assert.AreEqual(bug.Text, bugInDb.Text);
        }
        public void AddBug_WhenBugIsValid_ShouldAddToDb()
        {
            //arrange -> prapare the objects
            var bug = GetValidTestBug();

            var dbContext = new BugLoggerDbContext();
            var repo = new DbBugsRepository(dbContext);

            //act -> test the objects

            repo.Add(bug);
            repo.Save();

            //assert -> validate the result

            var bugInDb = dbContext.Bugs.Find(bug.Id);

            Assert.IsNotNull(bugInDb);
            Assert.AreEqual(bug.Text, bugInDb.Text);
        }