コード例 #1
0
        public void AddToDirectory_ShouldGetCorrectBool()
        {
            CarInContent    content = new CarInContent();
            CarInRepository repo    = new CarInRepository();

            bool addResult = repo.AddContentToDirectory(content);

            Assert.IsTrue(addResult);
        }
コード例 #2
0
        public void GetDirectory_ShouldReturnCorrectList()
        {
            CarInContent    testContent = new CarInContent();
            CarInRepository repo        = new CarInRepository();

            repo.AddContentToDirectory(testContent);

            List <CarInContent> testList = repo.GetContents();
            bool directoryHasContent     = testList.Contains(testContent);

            Assert.IsTrue(directoryHasContent);
        }
コード例 #3
0
        public void GetByLastName_ShouldReturnCorrectLastName()
        {
            CarInContent searchResult = _repo.GetContentByLastName("Singh");

            Assert.AreEqual(_content, searchResult);
        }
コード例 #4
0
 public void Arrange()
 {
     _repo    = new CarInRepository();
     _content = new CarInContent();
     _repo.AddContentToDirectory(_content);
 }