- Data:
- 2009-12-22 14:03:36 (16 years ago)
- Lokalizacja:
- trunk/eCard/eCardMVC
- Pliki:
-
- 3 zmodyfikowane
-
Platnosci.Tests/Web/FunkcjePlatnosciTests.cs (zmodyfikowane) (1 diff)
-
Platnosci/Controllers/PlatnoscController.cs (zmodyfikowane) (1 diff)
-
Platnosci/Models/FunkcjePlatnosci.cs (zmodyfikowane) (1 diff)
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
trunk/eCard/eCardMVC/Platnosci.Tests/Web/FunkcjePlatnosciTests.cs
r963 r966 50 50 Assert.That(payment.AMOUNT, Is.EqualTo(200)); 51 51 } 52 53 [Test, Sequential] 54 [Category("Unit")] 55 public void BruttoToString_Returns_Correct_Amount( 56 [Values(null, "", "pln", "PLN", "GBP", "gbp", "xx")] string input, 57 [Values("100 PLN ", "100 PLN ", "100 PLN ", "100 PLN ", "100 PLN (1 GBP)", "100 PLN (1 GBP)", "100 PLN (1 XX)")] string output 58 ) 59 { 60 //Arrange 61 var funkcjePlantosi = new FunkcjePlatnosci(); 62 63 //Act 64 var result = funkcjePlantosi.BruttoToString(100, 1, input); 65 66 //Act 67 System.Diagnostics.Debug.WriteLine(result); 68 Assert.That(result, Is.EqualTo(output)); 69 } 70 52 71 } 53 72 } -
trunk/eCard/eCardMVC/Platnosci/Controllers/PlatnoscController.cs
r957 r966 129 129 public ActionResult Status() 130 130 { 131 131 132 var potwierdzenie = new PotwierdzeniaEcard(); 132 133 var content = new ContentResult(); -
trunk/eCard/eCardMVC/Platnosci/Models/FunkcjePlatnosci.cs
r958 r966 42 42 { 43 43 var brutto = String.Format("{0:0.00}", kwota.ToString().Replace(",", ".")) + " PLN "; 44 45 if (!String.IsNullOrEmpty(miano)) 46 if (waluta > 0 && miano.ToUpper() != "PLN") 47 brutto += "(" + (waluta.ToString()).Replace(",", ".") + " " + miano.ToUpper() + ")"; 44 48 45 if (waluta > 0 && (miano != "" || miano.ToUpper() != "PLN"))46 brutto += "(" + (waluta.ToString()).Replace(",", ".") + " " + miano.ToUpper() + ")";47 48 49 return brutto; 49 50 }
