Пример #1
0
        public void DeleteAutoTest()
        {
            AutoManager autoManager = new AutoManager();
            Auto        auto        = autoManager.Auto(1);

            autoManager.Delete(auto);
            autoManager.Auto(1);
        }
Пример #2
0
        public void UpdateAutoTest()
        {
            AutoManager autoManager = new AutoManager();
            Auto        auto        = autoManager.Auto(1);

            auto.Marke      = "Fiat Multipla";
            auto.Tagestarif = 100;
            Auto updatedAuto = autoManager.Update(auto);

            Assert.AreEqual("Fiat Multipla", updatedAuto.Marke);
            Assert.AreEqual(100, updatedAuto.Tagestarif);
        }
Пример #3
0
        public void InsertAutoTest()
        {
            AutoManager autoManager = new AutoManager();
            Auto        auto        = new MittelklasseAuto {
                Marke = "Opel Corsa", Tagestarif = 100
            };
            Auto insertedAuto = autoManager.Insert(auto);

            Assert.AreEqual(4, insertedAuto.Id);
            Auto getAuto = autoManager.Auto(4);

            Assert.AreEqual("Opel Corsa", getAuto.Marke);
        }
        public void GetAuto(int id)
        {
            WriteActualMethod();
            IAutoReservationResultCallback cb = _createCallbackChannel();

            try
            {
                cb.SendAuto(autoManager.Auto(id).ConvertToDto());
            }
            catch (EntityNotFoundException ex)
            {
                cb.SendFault(new CommunicationFault {
                    Exception = ex.Message
                });
            }
        }