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