Pokaż
Ignoruj:
Data:
2009-12-22 10:43:43 (16 years ago)
Autor:
marek
Opis:

re #215

Lokalizacja:
trunk/eCard/eCardMVC/Platnosci.Tests/Web/UI
Pliki:
1 dodane
1 przeniesione

Legenda:

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

    r958 r960  
    22using WatiN.Core; 
    33 
    4 namespace Platnosci.Tests.Web 
     4namespace Platnosci.Tests.Web.UI 
    55{ 
    66    [TestFixture] 
    7     public class UIPlatnosciTests 
     7    public class MerchantTests 
    88    { 
    99        [Test] 
    1010        [Category("UI")] 
    11         public void CheckCorrectPay() 
     11        public void Redirects_To_Ecard_When_All_Details_Are_Correct() 
    1212        { 
    1313            const string test = "test"; 
     
    2121            ie.Button(Find.ById("place")).Click(); 
    2222            Assert.IsTrue(ie.ContainsText("Imię i nazwisko:" + test + " " + test)); 
     23            Assert.IsTrue(ie.Url.Contains("https://pay.ecard.pl/")); 
    2324            ie.ForceClose(); 
    2425            ie.Close(); 
     
    2829        [Test] 
    2930        [Category("UI")] 
    30         public void CheckErrorPay() 
     31        public void Returns_ZlyHash_When_Invoice_Amount_Is_Zero() 
    3132        { 
    32             const string test = "test"; 
    33             var ie = new IE("http://localhost:3646/pl/Account/LogOn"); 
    34             ie.TextField(Find.ByName("numerFaktury")).TypeText("27/ASZ/2009"); 
    35             ie.TextField(Find.ByName("nip")).TypeText("854956281"); 
    36             ie.Button(Find.ById("loguj")).Click(); 
     33            // wartosc faktury 1/SLJ/2009 jest 0 (zero) 
     34            // wowczas eCard powinien zwrocic zlyHash - stala informujaca, ze cos jest nie tak... 
    3735 
    38             ie.TextField(Find.ByName("Payer.FirstName")).TypeText(test); 
    39             ie.TextField(Find.ByName("Payer.LastName")).TypeText(""); 
    40             ie.Button(Find.ById("place")).Click(); 
    41             Assert.IsTrue(ie.ContainsText("Proszę podać")); 
    42             ie.ForceClose(); 
    43             ie.Close(); 
    44             ie.Dispose(); 
    45         } 
    46         [Test] 
    47         [Category("UI")] 
    48         public void AmountIsZeroReturnZlyHash() 
    49         { 
    5036            const string test = "test"; 
    5137            var ie = new IE("http://localhost:3646/pl/Account/LogOn"); 
     
    6147            ie.Close(); 
    6248            ie.Dispose(); 
    63              
    6449        } 
    6550    }