public void CalcPhysicalPersonDepositRateUsualClientTest() { var rate = new Rate(); decimal actualRate = rate.CalcPhysicalPersonDepositRate(ClientType.Usual); Assert.AreEqual(3.15m, actualRate, "Ставка не является ожидаемой."); }
private void OpenPhysicalPersonDepositButton_OnClick(object sender, RoutedEventArgs e) { AddingAnyAccountWindow accountWindow = new AddingAnyAccountWindow(); if (PhysicalPersonsDataGrid.CurrentItem != null) { PhysicalPersonClient client = (PhysicalPersonClient)PhysicalPersonsDataGrid.SelectedItem; if (accountWindow.ShowDialog() == true) { using (var repo = new PhysicalPersonClientRepository()) { repo.AddDeposit(client.Id, accountWindow.Currency, accountWindow.Amount, accountWindow.Period, accountWindow.WithCapitalization, rate.CalcPhysicalPersonDepositRate(client.Type)); } } } else { MessageBox.Show("Выберите нужного клиента!"); } }