public void VerifyOutofBoundsAlbum() { var id = 101; AlbumLoaderDAL.LoadAlbums(); var album = AlbumLoaderDAL.GetAlbumById(id); Assert.IsNull(album, "This should be null, we only have 100 albums and an error gets displayed to user!"); }
public void VerifyGetSingleAlbum() { var id = 10; AlbumLoaderDAL.LoadAlbums(); var album = AlbumLoaderDAL.GetAlbumById(id); Assert.AreEqual(id, album.AlbumId, "Album Ids do not match!"); }
public void VerifyAlbumPhoto() { var id = 3; var expectedId = 101; var expectedTitle = "incidunt alias vel enim"; AlbumLoaderDAL.LoadAlbums(); var album = AlbumLoaderDAL.GetAlbumById(id); var photo = album.Photos.Where(p => p.Id == expectedId).FirstOrDefault(); var actualId = photo.Id; var actualTitle = photo.Title; Assert.AreEqual(expectedId, actualId, "Ids do not match!"); Assert.AreEqual(expectedTitle, actualTitle, "Titles do not match!"); }
static void Main(string[] args) { AlbumLoaderDAL.LoadAlbums(); var runProgram = true; DisplayGreeting(); while (runProgram) { var input = InputBLL.GetInput(); if (InputBLL.ExitProgram(input)) { runProgram = false; } InputBLL.HandleInput(input); } void DisplayGreeting() { Console.WriteLine("Welcome to Alex's Techincal Showcase Photo Album!"); Console.WriteLine("In order to see a list of options please type 'help'."); Console.WriteLine("In order to view an Album's content please enter the album Id:"); } }
public void VerifyAlbumsLoad() { var albumList = AlbumLoaderDAL.LoadAlbums(); Assert.IsNotNull(albumList, "Album list failed to load correctly"); }