Beispiel #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);
        }