コード例 #1
0
        public void SeedContent()
        {
            CafeContent bigMac = new CafeContent(
                "Big Mac",
                "from Mcdonalds",
                "buns, patty, lettuce, onion, pickles, secret sauce",
                1,
                10
                );

            _repo.AddContentToDirectory(bigMac);
        }
コード例 #2
0
        public void AddToDirectory_ShouldGetCorrectBoolean()
        {
            CafeContent      content    = new CafeContent();
            CafeContent_Repo repository = new CafeContent_Repo();


            bool addResult = repository.AddContentToDirectory(content);


            Assert.IsTrue(addResult);
        }
コード例 #3
0
        public void GetDirectory_ShouldReturnCorrectCollection()
        {
            CafeContent      content = new CafeContent();
            CafeContent_Repo repo    = new CafeContent_Repo();

            repo.AddContentToDirectory(content);


            List <CafeContent> contents = repo.GetContents();

            bool directoryHasContent = contents.Contains(content);


            Assert.IsTrue(directoryHasContent);
        }