- Data:
- 2009-12-07 11:39:40 (16 years ago)
- Lokalizacja:
- trunk/eCard/eCardMVC/Platnosci.Tests
- Pliki:
-
- 2 zmodyfikowane
-
. (zmodyfikowane) (1 prop)
-
Web/PlatnosciControllerTests.cs (zmodyfikowane) (10 diffs)
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
trunk/eCard/eCardMVC/Platnosci.Tests
-
Włąściwość:
svn:ignore set
to
bin
-
Włąściwość:
svn:ignore set
to
-
trunk/eCard/eCardMVC/Platnosci.Tests/Web/PlatnosciControllerTests.cs
r927 r930 34 34 { 35 35 var repository = new Repository<PlatnosciEcard>(new FakeDataContext()); 36 var platnosci = _f. createNewPayment(orderNumber, false, DateTime.Now, 12345);36 var platnosci = _f.CreateNewPayment(orderNumber, false, DateTime.Now, 12345); 37 37 repository.Insert(platnosci); 38 38 repository.SubmitChanges(); … … 64 64 { 65 65 var repPayment = new Repository<PlatnosciEcard>(new FakeDataContext()); 66 var platnosci = _f. createNewPayment(orderNumber, false, DateTime.Now, 12345);66 var platnosci = _f.CreateNewPayment(orderNumber, false, DateTime.Now, 12345); 67 67 repPayment.Insert(platnosci); 68 68 repPayment.SubmitChanges(); … … 93 93 { 94 94 IRepository<PlatnosciEcard> repPayment = new Repository<PlatnosciEcard>(new FakeDataContext()); 95 PlatnosciEcard platnosc = _f. createNewPayment(orderNumber, false, data, 1);95 PlatnosciEcard platnosc = _f.CreateNewPayment(orderNumber, false, data, 1); 96 96 repPayment.Insert(platnosc); 97 97 … … 110 110 IRepository<PlatnosciEcard> repPayment = new Repository<PlatnosciEcard>(new FakeDataContext()); 111 111 112 PlatnosciEcard platnosc = _f. createNewPayment(orderNumber, false, data, 1);112 PlatnosciEcard platnosc = _f.CreateNewPayment(orderNumber, false, data, 1); 113 113 repPayment.Insert(platnosc); 114 114 … … 126 126 { 127 127 IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 128 vPlatnosciEcard platnosc = _f. createInvoice(123, "nip1", "", 0, 0);129 repVPayment.Insert(platnosc); 130 131 var controller = new PlatnoscController(repVPayment, null, null, _t); 132 controller.ControllerContext = _f. createControllerContext("nip2");128 vPlatnosciEcard platnosc = _f.CreateInvoice(123, "nip1", "", 0, 0); 129 repVPayment.Insert(platnosc); 130 131 var controller = new PlatnoscController(repVPayment, null, null, _t); 132 controller.ControllerContext = _f.CreateControllerContext("nip2"); 133 133 134 134 var result = controller.Show("123","pl") as ViewResult; … … 143 143 { 144 144 IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 145 vPlatnosciEcard platnosc = _f. createInvoice(123, "", "", 0, 0);145 vPlatnosciEcard platnosc = _f.CreateInvoice(123, "", "", 0, 0); 146 146 repVPayment.Insert(platnosc); 147 147 … … 161 161 //Tworzymy takie dane aby platnosc o danym id byla juz zaplacona 162 162 var repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 163 var invoice = _f. createInvoice(123, "nip1", "aaa", 0, 0);163 var invoice = _f.CreateInvoice(123, "nip1", "aaa", 0, 0); 164 164 repVPayment.Insert(invoice); 165 165 repVPayment.SubmitChanges(); 166 166 167 167 var repConfirm = new Repository<PotwierdzeniaEcard>(new FakeDataContext()); 168 var confirm = _f. createConfirm(code_Ok, 123456);168 var confirm = _f.CreateConfirm(code_Ok, 123456); 169 169 repConfirm.Insert(confirm); 170 170 repConfirm.SubmitChanges(); 171 171 172 172 var controller = new PlatnoscController(repVPayment, null, repConfirm, _t); 173 controller.ControllerContext = _f. createControllerContext("nip1");173 controller.ControllerContext = _f.CreateControllerContext("nip1"); 174 174 //controller.setZaplacono("Platnosc zostala uregulowana"); 175 175 … … 185 185 { 186 186 IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 187 vPlatnosciEcard platnosc = _f. createInvoice(123, "nip1", "numer", 200, 0);187 vPlatnosciEcard platnosc = _f.CreateInvoice(123, "nip1", "numer", 200, 0); 188 188 repVPayment.Insert(platnosc); 189 189 190 190 var repConfirm = new Repository<PotwierdzeniaEcard>(new FakeDataContext()); 191 var confirm = _f. createConfirm(code_Ok, 1);191 var confirm = _f.CreateConfirm(code_Ok, 1); 192 192 repConfirm.Insert(confirm); 193 193 repConfirm.SubmitChanges(); 194 194 195 195 var controller = new PlatnoscController(repVPayment, null, repConfirm, _t); 196 controller.ControllerContext = _f. createControllerContext("nip1");196 controller.ControllerContext = _f.CreateControllerContext("nip1"); 197 197 198 198 var result = controller.Show("123", "pl") as ViewResult; … … 209 209 { 210 210 IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 211 vPlatnosciEcard platnosc = _f. createInvoice(123, "nip1", "numer", 200, 0);212 repVPayment.Insert(platnosc); 213 214 var controller = new PlatnoscController(repVPayment, null, null, _t); 215 controller.ControllerContext = _f. createControllerContext("nip1");211 vPlatnosciEcard platnosc = _f.CreateInvoice(123, "nip1", "numer", 200, 0); 212 repVPayment.Insert(platnosc); 213 214 var controller = new PlatnoscController(repVPayment, null, null, _t); 215 controller.ControllerContext = _f.CreateControllerContext("nip1"); 216 216 217 Payer payer = _f. createPayer(123, "", "test"); //Brak imienia217 Payer payer = _f.CreatePayer(123, "", "test"); //Brak imienia 218 218 controller.Show(payer, "pl"); 219 219 Assert.That(controller.ModelState.IsValid, Is.False); … … 224 224 { 225 225 IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext()); 226 vPlatnosciEcard platnosc = _f. createInvoice(123, "nip1", "numer", 200, 0);227 repVPayment.Insert(platnosc); 228 229 var controller = new PlatnoscController(repVPayment, null, null, _t); 230 controller.ControllerContext = _f. createControllerContext("nip1");231 232 Payer payer = _f. createPayer(123, "test", "test");226 vPlatnosciEcard platnosc = _f.CreateInvoice(123, "nip1", "numer", 200, 0); 227 repVPayment.Insert(platnosc); 228 229 var controller = new PlatnoscController(repVPayment, null, null, _t); 230 controller.ControllerContext = _f.CreateControllerContext("nip1"); 231 232 Payer payer = _f.CreatePayer(123, "test", "test"); 233 233 var result = controller.Show(payer, "pl") as ViewResult; 234 234
