Esempio n. 1
0
        public void DeleteNonExistingCounterPartyTest()
        {
            var cl = new CounterPartyLogic(_jsonLogic);

            try
            {
                cl.DeleteConterparty(new Guid("db5c88d7-391c-11dd-90d9-001a92567626"));
                Assert.Fail();
            }
            catch (ResponseException e)
            {
                Assert.AreEqual(e.Errors[0], "Counterparty not found");
            }
        }
Esempio n. 2
0
        public void DeleteCounterPartyTest()
        {
            var cl = new CounterPartyLogic(_jsonLogic);
            var insertedCounterParty = cl.CreateConterparty(new CounterParty()
            {
                CityRef              = new Guid("db5c88d7-391c-11dd-90d9-001a92567626"),
                FirstName            = "Фелікс",
                MiddleName           = "Едуардович",
                LastName             = "Яковлєв",
                Phone                = "0997979789",
                Email                = "",
                CounterpartyType     = "PrivatePerson",
                CounterpartyProperty = "Recipient"
            });

            insertedCounterParty.FirstName = "Фелікс2";
            insertedCounterParty.CityRef   = new Guid("db5c88d7-391c-11dd-90d9-001a92567626");
            insertedCounterParty.Phone     = "0997979789";
            var result = cl.DeleteConterparty(insertedCounterParty.Ref.Value);

            Assert.AreEqual(result.Ref.Value, insertedCounterParty.Ref.Value);
            Assert.AreEqual(result.FirstName, null);
        }