public LibraryExplorer(LibraryApiClient apiClient) { var bookBag = new BookBag(); _defaultCommands = new List<ICommand> { new ExploreLibraryCommand(apiClient,bookBag), new ViewCheckedOutBooksCommand(bookBag,apiClient), new ExitLibraryCommand(), }; }
public void Initial_list_is_empty_bagbooks() { // Arrange // Act BookBag <string> myList = new BookBag <string>(); // Assert Assert.Equal(0, myList.Count); }
public void Add_to_emptyList_bookbags() { // Arrange BookBag <int> myList = new BookBag <int>(); // Act myList.Add(4); // Assert Assert.Equal(1, myList.Count); }
public LibraryExplorer(LibraryApiClient apiClient) { var bookBag = new BookBag(); _defaultCommands = new List <ICommand> { new ExploreLibraryCommand(apiClient, bookBag), new ViewCheckedOutBooksCommand(bookBag, apiClient), new ExitLibraryCommand(), }; }
public void Add_to_List_bookbag() { // Arrange BookBag <int> myList = new BookBag <int>(); myList.Add(4); myList.Add(1); myList.Add(6); // Act myList.Add(2); // Assert Assert.Equal(4, myList.Count); }
public void can_add_over_capacity_bookbags() { int capacity = 4; // Arrange BookBag <int> myList = new BookBag <int>(capacity); // Act myList.Add(1); myList.Add(2); myList.Add(3); myList.Add(4); myList.Add(5); myList.Add(6); // Assert Assert.Equal(6, myList.Count); }
public ViewCheckedOutBooksCommand(BookBag bookBag, LibraryApiClient libraryApiClient) { _bookBag = bookBag; _libraryApiClient = libraryApiClient; }
public ExploreLibraryCommand(LibraryApiClient libraryApiClient,BookBag bookBag) { _libraryApiClient = libraryApiClient; _bookBag = bookBag; }
public ViewBookCommand(Book book, BookBag bookBag, LibraryApiClient libraryApiClient) { _book = book; _bookBag = bookBag; _libraryApiClient = libraryApiClient; }
public ExploreLibraryCommand(LibraryApiClient libraryApiClient, BookBag bookBag) { _libraryApiClient = libraryApiClient; _bookBag = bookBag; }
public CheckOutBookCommand(Book book, BookBag bookBag, LibraryApiClient libraryApiClient) { _bookBag = bookBag; _book = book; _libraryApiClient = libraryApiClient; }