public void GetEnumFrostring_ExpenseEnumEditFalse_Titel()
 {
     Assert.AreEqual(Strings.AddExpenseTitle, PaymentTypeHelper.GetViewTitleForType(PaymentType.Expense, false));
 }
示例#2
0
 public void GetEnumFromString_Expense_Titel(PaymentType type, string typeString)
 {
     Assert.Equal(type, PaymentTypeHelper.GetEnumFromString(typeString));
 }
 public void GetEnumFromString_Transfer_Titel()
 {
     Assert.AreEqual(PaymentType.Transfer, PaymentTypeHelper.GetEnumFromString("Transfer"));
 }
 public void GetEnumFrostring_TransferEnumEditTrue_Titel()
 {
     Assert.AreEqual(Strings.EditTransferTitle, PaymentTypeHelper.GetViewTitleForType(PaymentType.Transfer, true));
 }
示例#5
0
 public void GetTypeString_EnumString(int enumInt, string enumString)
 {
     PaymentTypeHelper.GetTypeString(enumInt).ShouldBe(enumString);
 }
 public void GetEnumFromString_Income_Titel()
 {
     Assert.AreEqual(PaymentType.Income, PaymentTypeHelper.GetEnumFromString("Income"));
 }
示例#7
0
 public void GetEnumFromString_IncomeEnumEditFalse_Title()
 {
     Assert.Equal(Strings.AddIncomeTitle, PaymentTypeHelper.GetViewTitleForType(PaymentType.Income, false));
 }
示例#8
0
 public void GetEnumFrostring_IncomeIntEditFalse_Titel()
 {
     Assert.Equal(Strings.AddIncomeTitle, PaymentTypeHelper.GetViewTitleForType(1, false));
 }
示例#9
0
 public void GetEnumFromString_ExpenseEnumEditTrue_Title()
 {
     Assert.Equal(Strings.EditSpendingTitle, PaymentTypeHelper.GetViewTitleForType(PaymentType.Expense, true));
 }
示例#10
0
 public void GetEnumFromString_IncomeEnumEditTrue_Title()
 {
     Assert.Equal(Strings.EditIncomeTitle, PaymentTypeHelper.GetViewTitleForType(PaymentType.Income, true));
 }
示例#11
0
 public void GetEnumFromString_ExpenseIntEditFalse_Title()
 {
     Assert.Equal(Strings.AddExpenseTitle, PaymentTypeHelper.GetViewTitleForType(0, false));
 }
示例#12
0
 public void GetEnumFromString_TransferIntEditTrue_Title()
 {
     Assert.Equal(Strings.EditTransferTitle, PaymentTypeHelper.GetViewTitleForType(2, true));
 }
示例#13
0
 public void GetTypeString_InvalidType_Exception(int enumInt)
 {
     Assert.Throws <ArgumentOutOfRangeException>(() => PaymentTypeHelper.GetTypeString(enumInt));
 }
示例#14
0
 public void GetEnumFrostring_ExpenseIntEditTrue_Titel()
 {
     Assert.Equal(Strings.EditSpendingTitle, PaymentTypeHelper.GetViewTitleForType(0, true));
 }
示例#15
0
 public void GetEnumFromString_TransferEnumEditFalse_Title()
 {
     Assert.Equal(Strings.AddTransferTitle, PaymentTypeHelper.GetViewTitleForType(PaymentType.Transfer, false));
 }
示例#16
0
 public void GetEnumFrostring_IncomeIntEditTrue_Titel()
 {
     Assert.Equal(Strings.EditIncomeTitle, PaymentTypeHelper.GetViewTitleForType(1, true));
 }
示例#17
0
 public void GetEnumFromString_Expense_Titel()
 {
     Assert.AreEqual(PaymentType.Expense, PaymentTypeHelper.GetEnumFromString("Expense"));
 }
示例#18
0
 public void GetEnumFrostring_TransferIntEditFalse_Titel()
 {
     Assert.Equal(Strings.AddTransferTitle, PaymentTypeHelper.GetViewTitleForType(2, false));
 }
示例#19
0
 public override void Prepare(ModifyPaymentParameter parameter)
 {
     SelectedPayment = crudServices.ReadSingleAsync <PaymentViewModel>(parameter.PaymentId).Result;
     Title           = PaymentTypeHelper.GetViewTitleForType(parameter.PaymentType, true);
     base.Prepare(parameter);
 }