- Data:
- 2009-12-23 11:26:06 (16 years ago)
- Pliki:
-
- 1 zmodyfikowane
-
trunk/eCard/eCardMVC/Platnosci.Tests/Web/PlatnosciControllerTests.cs (zmodyfikowane) (10 diffs)
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
trunk/eCard/eCardMVC/Platnosci.Tests/Web/PlatnosciControllerTests.cs
r969 r970 1 1 using System; 2 using System.Linq;3 2 using System.Web.Mvc; 4 3 using adMoto.Payments.Core; 4 using adMoto.Payments.Core.Data; 5 using adMoto.Payments.Core.Interfaces; 5 6 using NUnit.Framework; 6 using MvcContrib.TestHelper;7 7 using Platnosci.Controllers; 8 9 using Platnosci.Core.Interface;10 using Platnosci.Core.Linq;11 8 using Platnosci.Models; 12 9 … … 141 138 { 142 139 //Arrange 143 IRepository< vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext());140 IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 144 141 var platnosc = _function.CreateInvoice(123, "nip1", "", 0, 0); 145 142 repVPayment.Insert(platnosc); … … 162 159 { 163 160 //Arrange 164 IRepository< vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext());165 v PlatnosciEcardplatnosc = _function.CreateInvoice(123, "nip2", "", 0, 0);161 IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 162 var platnosc = _function.CreateInvoice(123, "nip2", "", 0, 0); 166 163 repVPayment.Insert(platnosc); 167 164 … … 185 182 //Arrange 186 183 //Tworzymy takie dane aby platnosc o danym id byla juz zaplacona 187 var repVPayment = new Repository< vPlatnosciEcard>(new FakeDataContext());184 var repVPayment = new Repository<Invoice>(new FakeDataContext()); 188 185 var invoice = _function.CreateInvoice(123, "nip1", "aaa", 0, 0); 189 186 repVPayment.Insert(invoice); … … 212 209 { 213 210 //Arrange 214 IRepository< vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext());215 v PlatnosciEcardplatnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0);211 IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 212 var platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 216 213 repVPayment.Insert(platnosc); 217 214 … … 240 237 { 241 238 //Arrange 242 IRepository< vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext());243 v PlatnosciEcardplatnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0);239 IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 240 var platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 244 241 repVPayment.Insert(platnosc); 245 242 … … 261 258 { 262 259 //Arrange 263 IRepository< vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext());264 v PlatnosciEcardplatnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0);260 IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 261 var platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 265 262 repVPayment.Insert(platnosc); 266 263 … … 282 279 { 283 280 //Arrange 284 IRepository< vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext());285 v PlatnosciEcardplatnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0);286 repVPayment.Insert(platnosc); 287 288 var controller = new PlatnoscController(repVPayment, null, null, _translateManager); 289 controller.ControllerContext = _function.CreateControllerContext("nip1"); 290 stringname = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";291 Payer payer = _function.CreatePayer(123, name, "test");281 IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 282 var platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 283 repVPayment.Insert(platnosc); 284 285 var controller = new PlatnoscController(repVPayment, null, null, _translateManager); 286 controller.ControllerContext = _function.CreateControllerContext("nip1"); 287 var name = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; 288 var payer = _function.CreatePayer(123, name, "test"); 292 289 293 290 //Act … … 303 300 { 304 301 //Arrange 305 IRepository< vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext());306 v PlatnosciEcardplatnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0);307 repVPayment.Insert(platnosc); 308 309 var controller = new PlatnoscController(repVPayment, null, null, _translateManager); 310 controller.ControllerContext = _function.CreateControllerContext("nip1"); 311 stringsurname = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";312 Payer payer = _function.CreatePayer(123, "test", surname);302 IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 303 var platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 304 repVPayment.Insert(platnosc); 305 306 var controller = new PlatnoscController(repVPayment, null, null, _translateManager); 307 controller.ControllerContext = _function.CreateControllerContext("nip1"); 308 var surname = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; 309 var payer = _function.CreatePayer(123, "test", surname); 313 310 314 311 //Act … … 324 321 { 325 322 //Arrange 326 IRepository< vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext());327 v PlatnosciEcardplatnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0);323 IRepository<Invoice> repVPayment = new Repository<Invoice>(new FakeDataContext()); 324 var platnosc = _function.CreateInvoice(123, "nip1", "numer", 200, 0); 328 325 repVPayment.Insert(platnosc); 329 326
