Ejemplo n.º 1
0
        public bool IsArtist(CD CurrentCD)
        {
            string MyName = CurrentCD.GetArtist();

            if (MyName == _name)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 2
0
        public void GetArtist_ReturnsEmptyArtistList_ItemList()
        {
            //Arrange
            string        name        = "Artist Name";
            CD            newCategory = new CD(name);
            List <Artist> newList     = new List <Artist> {
            };

            //Act
            List <Artist> result = newCategory.GetArtist();

            //Assert
            CollectionAssert.AreEqual(newList, result);
        }
Ejemplo n.º 3
0
        public void AddItem_AssociatesItemWithCategory_ArtistList()
        {
            //Arrange
            string        description = "Walk the dog.";
            Artist        newArtist   = new Artist(description);
            List <Artist> newList     = new List <Artist> {
                newArtist
            };

            string name  = "Work";
            CD     newCD = new CD(name);

            newCD.AddArtist(newArtist);

            //Act
            List <Artist> result = newCD.GetArtist();

            //Assert
            CollectionAssert.AreEqual(newList, result);
        }