Пример #1
0
        public void testAddingValidRecords()
        {
            Record r1 = new Record(new RecordInfoBuilder()
                                   .withRecordName("test")
                                   .withArtist("testArtist")
                                   .withYear(2000)
                                   .withRecordCondition(RecordCondition.Good)
                                   .withSleeveCondition(RecordCondition.Good)
                                   .withPrice(100.0)
                                   .withID(100)
                                   .build());

            Record r2 = new Record(new RecordInfoBuilder()
                                   .withRecordName("test2")
                                   .withArtist("testArtist")
                                   .withYear(1999)
                                   .withRecordCondition(RecordCondition.Good)
                                   .withSleeveCondition(RecordCondition.Mint)
                                   .withPrice(200.0)
                                   .withID(99)
                                   .build());

            rList.addRecord(r1);
            Assert.AreEqual(rList.getRecord(100), r1);

            rList.addRecord(r2);
            Assert.AreEqual(rList.getRecord(99), r2);

            rList.removeRecord(100);
            rList.removeRecord(99);
        }
Пример #2
0
 public void initializeTests()
 {
     newAccount = new Account("durkeed", "likesjava");
     recList.addRecord(new Record(new RecordInfo("a", 1, RecordCondition.Good, RecordCondition.Good, 1, "b", 1, "c", "d")));
 }
 /// <summary>
 /// Adds record to record list.
 /// </summary>
 /// <param name="rec"></param>
 public void addRecord(Record rec)
 {
     recordList.addRecord(rec);
 }