/// <summary>
        /// Calls for information from the UI and tells the recordList to create the new record.
        /// </summary>
        /// <param name="name"></param>
        /// <param name="artist"></param>
        /// <param name="year"></param>
        /// <param name="recCond"></param>
        /// <param name="sleeveCond"></param>
        /// <param name="price"></param>
        /// <param name="albumArt"></param>
        /// <param name="note"></param>
        public void addNewRecord(string name, string artist, int year, RecordCondition recCond, RecordCondition sleeveCond, double price, string albumArt, string note)
        {
            this.generateNewID();
            Record newRecord = new Record(new RecordInfoBuilder()
                                          .withRecordName(name)
                                          .withArtist(artist)
                                          .withRecordCondition(recCond)
                                          .withSleeveCondition(sleeveCond)
                                          .withYear(year)
                                          .withPrice(price)
                                          .withID(currentID)
                                          .withAlbumArt(albumArt)
                                          .withNote(note)
                                          .build());

            //recordList.addRecord(newRecord);
            //CommandPattern
            recInvoker.doCommand(new AddRecord(newRecord, recordList));
        }
Example #2
0
 public void checkDo()
 {
     r.doCommand(new AddRecord(rec, list));
     Assert.IsNotNull(list.getList());
 }