Index: trunk/eCard/eCardMVC/Platnosci.Tests/Web/FakeTranslate.cs
===================================================================
--- trunk/eCard/eCardMVC/Platnosci.Tests/Web/FakeTranslate.cs (revision 904)
+++ trunk/eCard/eCardMVC/Platnosci.Tests/Web/FakeTranslate.cs (revision 919)
@@ -11,10 +11,11 @@
         public string TranslateStr(string className, string keyName)
         {
-            if(keyName == "weryfikacja") return "weryfikacja";
-                else if(keyName == "brakdanych") return "brakdanych";
-                else if(keyName == "zaplacono") return "zaplacono";
-                else if(keyName == "err_imieWK") return "imie";
-                else if(keyName == "err_nazwiskoWK") return "nazwisko";
-            
+            if (keyName == "weryfikacja") return "weryfikacja";
+            else if (keyName == "brakdanych") return "brakdanych";
+            else if (keyName == "zaplacono") return "zaplacono";
+            else if (keyName == "err_imieWK") return "imie";
+            else if (keyName == "err_nazwiskoWK") return "nazwisko";
+            else if (keyName == "error_hash") return "error_hash";
+
             return "";
         }
Index: trunk/eCard/eCardMVC/Platnosci.Tests/Web/MerchantControllerTests.cs
===================================================================
--- trunk/eCard/eCardMVC/Platnosci.Tests/Web/MerchantControllerTests.cs (revision 919)
+++ trunk/eCard/eCardMVC/Platnosci.Tests/Web/MerchantControllerTests.cs (revision 919)
@@ -0,0 +1,61 @@
+﻿using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using NUnit.Framework;
+using Platnosci.Core.Linq;
+using Platnosci.Core.Interface;
+using MvcContrib.TestHelper;
+using Platnosci.Controllers;
+using Platnosci.Models;
+using System.Web.Mvc;
+
+namespace Platnosci.Tests.Web
+{
+    [TestFixture] 
+    class MerchantControllerTests
+    {
+        private Function _f = new Function();
+        private ITranslate _t = new FakeTranslate();
+
+        [Test]
+        [Category("Unit")]
+        public void IncorrectUserIdentity_ReturnErrorView()
+        {
+            IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext());
+            vPlatnosciEcard platnosc = _f.createInvoice(123, "nip1", "", 0, 0);
+            repVPayment.Insert(platnosc);
+
+            Payer payer = _f.createPayer(123, "test", "test");
+
+            var controller = new PlatnoscController(repVPayment, null, null, _t);
+            controller.ControllerContext = _f.createControllerContext("nip2");
+
+            var result = controller.Show(payer, "pl") as ViewResult;
+            var error = (ErrorViewData)result.ViewData.Model;
+
+            Assert.That(error.error, Is.EqualTo("weryfikacja"));
+            Assert.That(result.ViewName, Is.EqualTo("Error1"));
+        }
+        [Test]
+        [Category("Unit")]
+        public void PaymentNotFound_ReturnErrorView()
+        {
+            IRepository<vPlatnosciEcard> repVPayment = new Repository<vPlatnosciEcard>(new FakeDataContext());
+            vPlatnosciEcard platnosc = _f.createInvoice(12, "nip1", "", 0, 0);
+            repVPayment.Insert(platnosc);
+
+            Payer payer = _f.createPayer(123, "test", "test");
+
+            var controller = new PlatnoscController(repVPayment, null, null, _t);
+            controller.ControllerContext = _f.createControllerContext("nip2");
+
+            var result = controller.Show(payer, "pl") as ViewResult;
+            var error = (ErrorViewData)result.ViewData.Model;
+
+            Assert.That(error.error, Is.EqualTo("brakdanych"));
+            Assert.That(result.ViewName, Is.EqualTo("Error1"));
+        }
+        
+    }
+}
