protected void TestInitializeBase() { var config = new ConfigurationBuilder().AddJsonFile("appconfig.json").Build();// ECB API URL HERE userRepository = new UserRepository(); userService = new UserService(userRepository); currencyService = new CurrencyService(config); accountService = new AccountService(userService, currencyService); defaultThreeAccountCurrencies = new List <Currency> { Currency.RUB, Currency.USD, Currency.EUR }; defaultOneAccountCurrency = new List <Currency> { Currency.IDR }; uniqueUsers = UsersInit.GetAllUsers(); dupeUsers = UsersInit.GetAllUsersWithDuplicate(); uniqueAccounts = AccountInit.GetAllAccounts(); dupeAccounts = AccountInit.GetAllAccountsWithDuplicate(); uniqueAccountInfoColl = AccountInfoInit.GetAccountInfoList(); dupeAccountInfoColl = AccountInfoInit.GetAccountInfosWithDuplicate(); uniqueMoneyColl = MoneyListInit.GetMoneyList1(); dupeMoneyColl = MoneyListInit.GetMoneyListWithDuplicates(); basicTestMoneyList = MoneyListInit.GetOperatorTestMoney(); uniqueVOCollections = ValueObjectCollectionInit.GetValueObjectCollectionList(); dupeVOCollections = ValueObjectCollectionInit.GetValueObjectCollectionListWithDuplicates(); }
public bool Equals(IValueObjectCollection <TValueObject> other) { if (other.Count != this.Count) { return(false); } bool same = true; foreach (var item in other) { if (same) { same = (null != other.FirstOrDefault(x => x.Equals(item))); } } return(same); }
public AccountInfo(Money balance, IValueObjectCollection <Money> otherCurrencies) { Balance = balance; OtherCurrencies = otherCurrencies; }
public IValueObjectCollection <TValueObject> AddRange(IValueObjectCollection <TValueObject> collection) { var resultList = _Items.AddRange(collection.ToImmutableList()); return(new ValueObjectCollection <TValueObject>(resultList)); }