예제 #1
0
        public void RaiseContentChangeWhenAddItemToPlayList()
        {
            var newItem = new PlayListItem(new ImageId(30), "");
            var playListListener = MockRepository.GenerateMock<PlayListListener>();
            playListListener.Expect(l => l.ContentChanged(new PlayListContent(0, "", new []{newItem})));
            var playList = new PlayList(new PlayListContent(0, "", new PlayListItem[0]), null);
            playList.AddListener(playListListener);

            playList.AddItem(newItem);
        }
예제 #2
0
        public void RaiseContentChangeWhenAddItemToPlayList()
        {
            var newItem          = new PlayListItem(new ImageId(30), "");
            var playListListener = MockRepository.GenerateMock <PlayListListener>();

            playListListener.Expect(l => l.ContentChanged(new PlayListContent(0, "", new [] { newItem })));
            var playList = new PlayList(new PlayListContent(0, "", new PlayListItem[0]), null);

            playList.AddListener(playListListener);

            playList.AddItem(newItem);
        }