コード例 #1
0
        public void ReturnFromClientWaybill_Must_Throw_Exception_If_DeleteRow_From_Accepted_WaybillRow()
        {
            try
            {
                row1 = new ReturnFromClientWaybillRow(saleRow1, 1);
                returnFromClientWaybill.AddRow(row1);
                returnFromClientWaybill.Accept(Prices, false, curator, DateTime.Now);
                returnFromClientWaybill.DeleteRow(row1);

                Assert.Fail("Исключение не вызвано.");
            }
            catch (Exception ex)
            {
                if (!ex.Message.StartsWith("Невозможно удалить позицию из накладной со статусом "))
                {
                    Assert.Fail("Исключение не верно.");
                }
            }
        }
コード例 #2
0
        public void ReturnFromClientWaybillService_Rows_MustBe_DeletedOk()
        {
            returnFromClientWaybill.DeleteRow(returnFromClientWaybill.Rows.First());

            Assert.AreEqual(0, returnFromClientWaybill.RowCount);
        }