public void TestGetAllContainsAllPeople()
        {
            Mock <IPerson> mockPersonBob = new Mock <IPerson>();

            mockPersonBob.Setup(x => x.Name).Returns("Bob");

            Mock <IPerson> mockPersonJohn = new Mock <IPerson>();

            mockPersonJohn.Setup(x => x.Name).Returns("John");

            ArrayPersonRepository arrayRepoSut = new ArrayPersonRepository(new List <IPerson>()
            {
                mockPersonJohn.Object,
                mockPersonBob.Object
            }
                                                                           );

            Assert.IsTrue(
                arrayRepoSut.GetAll().Contains(mockPersonJohn.Object)
                );

            Assert.IsTrue(
                arrayRepoSut.GetAll().Contains(mockPersonBob.Object)
                );
        }
        public void TestGetPersonReturnsCorrectPerson()
        {
            Mock <IPerson> mockPersonBob = new Mock <IPerson>();

            mockPersonBob.Setup(x => x.Name).Returns("Bob");

            Mock <IPerson> mockPersonJohn = new Mock <IPerson>();

            mockPersonJohn.Setup(x => x.Name).Returns("John");

            ArrayPersonRepository arrayRepoSut = new ArrayPersonRepository(new List <IPerson>()
            {
                mockPersonJohn.Object,
                mockPersonBob.Object
            }
                                                                           );

            Assert.IsTrue(
                arrayRepoSut.Get("John").Equals(mockPersonJohn.Object)
                );
        }
        public void TestInsertInsertsPerson()
        {
            Mock <IPerson> mockPersonBob = new Mock <IPerson>();

            mockPersonBob.Setup(x => x.Name).Returns("Bob");

            Mock <IPerson> mockPersonJohn = new Mock <IPerson>();

            mockPersonJohn.Setup(x => x.Name).Returns("John");

            ArrayPersonRepository arrayRepoSut = new ArrayPersonRepository(new List <IPerson>()
            {
                mockPersonJohn.Object
            }
                                                                           );

            arrayRepoSut.Insert(mockPersonBob.Object);

            Assert.IsTrue(
                arrayRepoSut.Get("Bob") != null
                );
        }