示例#1
0
        public void Insert__CorrectTupleWithErrorCode__FillDbTable_st_res_error()
        {
            // Arrange.
            exportNsiItemParameters.insertData = new[] { new Tuple <string, string> ("MessageGUID", "8e867011-7e88-4abf-a0b1-4b9c7bfd3742"),
                                                         new Tuple <string, string> ("ErrorCode", "INT016001"),
                                                         new Tuple <string, string> ("Description", "Справочник с реестровым номером 9999 не найден."), };

            exportNsiItemModel = new ExportNsiItemModel(exportNsiItemParameters);

            DataTable table = new DataTable();

            table.Columns.Add("REGUESTERMESSAGEGUID");
            table.Columns.Add("lISTGROUP");
            table.Columns.Add("REGISTRYNUMBER");

            DataRow row = table.NewRow();

            row["REGUESTERMESSAGEGUID"] = "3d78473c-c0e9-61d3-e050-a8c005015fb0";
            row["lISTGROUP"]            = "NSI";
            row["REGISTRYNUMBER"]       = "10";

            table.Rows.Add(row);

            exportNsiItemModel.ResultData = table;

            // Act.
            exportNsiItemModel.Insert();

            // Assert - NO EXCEPTION.
        }
示例#2
0
        public void Insert__CorrectTuple__FillDbTable_st_res_export_nsi_Item10()
        {
            // Arrange.
            exportNsiItemModel = new ExportNsiItemModel(exportNsiItemParameters);

            DataTable table = new DataTable();

            table.Columns.Add("REGUESTERMESSAGEGUID");
            table.Columns.Add("lISTGROUP");
            table.Columns.Add("REGISTERNUMBER");

            DataRow row = table.NewRow();

            row["REGUESTERMESSAGEGUID"] = "3d78473c-c0e9-61d3-e050-a8c005015fb0";
            row["lISTGROUP"]            = "NSI";
            row["REGISTERNUMBER"]       = "10";

            table.Rows.Add(row);

            exportNsiItemModel.ResultData = table;

            // Act.
            exportNsiItemModel.Insert();

            // Assert - NO EXCEPTION. Заполнение таблицы gis.st_res_export_nsi_item_10.
        }