public void ShouldReturnLongViewArtist() { var artist = new Artist { Name = "Artist", Bio = "A new artist", ProfileUrl = "www.newartist.com" }; var artistLongView = new LongView(new ArtistResource(artist)); Assert.AreEqual($"Long View - {artist.Name} | {artist.Bio} | {artist.ProfileUrl}", artistLongView.Show()); }
private static void Bridge() { var song = new Song("jimikki kammal", "Velipadinte pusthakam song", "Photo is here ***** "); var movie = new Movie("Velipadinte pusthakam", "Mohanlal and Lal jose for the first time together", "Photo ***** "); var longView = new LongView(); Console.WriteLine("Displaying on a long view"); longView.DisplayOnMonitor(song, movie); var shortView = new ShortView(); Console.WriteLine("Displaying on a short view"); shortView.DisplayOnMonitor(song, movie); }
static void Main(string[] args) { // Creating arist resource var artist = new Artist() { Image = "drunkInGreatCanyon.jpeg", Name = "Bruce Springsteen" }; var artistResource = new ArtistResoruce(artist); // Creating book resource var book = new Book() { Author = "Camus", Description = " published in 1947, that tells the story of suffering", Genre = "Philosophy", Image = "drunkInChurch.jpeg" }; var bookResource = new BookResource(book); // Creating some types of views var longArtistView = new LongView(artistResource); var shortArtistView = new ShortView(artistResource); var longBookView = new LongView(bookResource); var shortBookView = new ShortView(bookResource); var views = new IView[] { longArtistView, shortArtistView, longBookView, shortBookView }; foreach (var view in views) { // returns string view.Show().Print(); } Console.Read(); }