Zbiór zmian 966 dla trunk

Pokaż
Ignoruj:
Data:
2009-12-22 14:03:36 (16 years ago)
Autor:
alina
Opis:

re #215 poprawka funkcji BruttoToString?()

Lokalizacja:
trunk/eCard/eCardMVC
Pliki:
3 zmodyfikowane

Legenda:

Bez zmian
Dodane
Usunięte
  • trunk/eCard/eCardMVC/Platnosci.Tests/Web/FunkcjePlatnosciTests.cs

    r963 r966  
    5050            Assert.That(payment.AMOUNT, Is.EqualTo(200)); 
    5151        } 
     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         
    5271    } 
    5372} 
  • trunk/eCard/eCardMVC/Platnosci/Controllers/PlatnoscController.cs

    r957 r966  
    129129        public ActionResult Status() 
    130130        {  
     131 
    131132            var potwierdzenie = new PotwierdzeniaEcard(); 
    132133            var content = new ContentResult(); 
  • trunk/eCard/eCardMVC/Platnosci/Models/FunkcjePlatnosci.cs

    r958 r966  
    4242        { 
    4343            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() + ")"; 
    4448             
    45             if (waluta > 0 && (miano != "" || miano.ToUpper() != "PLN")) 
    46                 brutto += "(" + (waluta.ToString()).Replace(",", ".") + " " + miano.ToUpper() + ")"; 
    47  
    4849            return brutto; 
    4950        }