- Data:
- 2009-12-29 15:26:07 (16 years ago)
- Pliki:
-
- 1 zmodyfikowane
-
trunk/eCard/eCardMVC/adMoto.Payments.Test/UI/AuthenticationTests.cs (zmodyfikowane) (2 diffs)
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
trunk/eCard/eCardMVC/adMoto.Payments.Test/UI/AuthenticationTests.cs
r984 r985 1 1 using NUnit.Framework; 2 2 using WatiN.Core; 3 using System.Configuration; 3 4 4 5 namespace adMoto.Payments.Test.UI … … 7 8 public class AuthenticationTests 8 9 { 9 private readonly UIHelper _uidata = new UIHelper(); 10 10 private readonly UIHelper _uiHelper = new UIHelper(); 11 private static string adres = UIHelper.LoginSite; 12 11 13 [Test] 12 14 [Category("UI")] 13 15 public void Can_Not_Login_When_Using_InValid_Login_Information() 14 16 { 15 var ie = new IE( "http://localhost:3646/pl/Account/LogOn");17 var ie = new IE(adres); 16 18 ie.TextField(Find.ByName("numerFaktury")).TypeText(""); 17 19 ie.TextField(Find.ByName("nip")).TypeText(""); 18 20 ie.Button(Find.ById("loguj")).Click(); 19 21 Assert.IsTrue(ie.ContainsText("Logowanie nie powiodło się")); 20 ie.ForceClose(); 21 ie.Close(); 22 ie.Dispose(); 22 _uiHelper.CloseWebBrowser(ie); 23 23 } 24 24 25 25 [Test] 26 26 [Category("UI")] 27 27 public void Can_Login_When_Using_Correct_Login_Information() 28 28 { 29 var uiData = _ui data.CreateAndAddTestRecordToRepository(0);30 31 var ie = new IE( "http://localhost:3646/pl/Account/LogOn");29 var uiData = _uiHelper.CreateAndAddTestRecordToRepository(0); 30 31 var ie = new IE(adres); 32 32 ie.TextField(Find.ByName("numerFaktury")).TypeText(uiData.Test_numer_faktury); 33 33 ie.TextField(Find.ByName("nip")).TypeText(uiData.Test_nip); 34 34 ie.Button(Find.ById("loguj")).Click(); 35 35 Assert.IsTrue(ie.ContainsText("Szczegóły zlecenia")); 36 ie.ForceClose(); 37 ie.Close(); 38 ie.Dispose(); 39 40 _uidata.DeleteTestRecordsFromRepository(uiData); 36 _uiHelper.CloseWebBrowser(ie); 37 _uiHelper.DeleteTestRecordsFromRepository(uiData); 41 38 } 42 39 }
