public void CheckAllNotesLoadedSuccessfullyWithoutCheckingNoteContents() { var noteRepository = GetNoteRepository(); var loadedNotes = noteRepository.Load(CurrencyRegistry.GetCurrency(Currency)); Assert.IsTrue(InitNoteShifts.Length == loadedNotes.Count); }
public static MoneyCollection ToMoneyCollection(this MoneyInfo moneyInfo) { var moneyCollection = MoneyCollection.Create(CurrencyRegistry.GetCurrency(moneyInfo.Currency)); moneyInfo.Coins.ForEach(coinInfo => moneyCollection.Coins.Add(coinInfo.Nominal, coinInfo.Count)); moneyInfo.Notes.ForEach(noteInfo => moneyCollection.Notes.Add(noteInfo.Nominal, noteInfo.Count)); return(moneyCollection); }
private IDictionary <int, NoteShift> LoadNotes(NoteRepository noteRepository) { return(noteRepository.Load(CurrencyRegistry.GetCurrency(Currency)) .ToDictionary(noteEntity => noteEntity.Nominal, noteEntity => noteEntity)); }