Пример #1
0
        public void AssertAreEqual_WithDataRowNull()
        {
            //Arrange
            DataRow dataRow       = null;
            string  columnName    = "Column1";
            string  expectedValue = Guid.NewGuid().ToString();

            // Action
            DataRowExtensions.AssertAreEqual(dataRow, columnName, expectedValue);
        }
Пример #2
0
        public void AssertAreEqual_WithColumnNameStringEmpty()
        {
            //Arrange
            var dataTable = new DataTable();

            string columnName = string.Empty;
            var    dataColumn = new DataColumn(columnName);

            dataTable.Columns.Add(dataColumn);

            var dataRow = dataTable.NewRow();

            string expectedValue = Guid.NewGuid().ToString();

            // Action
            DataRowExtensions.AssertAreEqual(dataRow, columnName, expectedValue);
        }
Пример #3
0
        public void AssertAreEqual_WithNonEqualValues()
        {
            //Arrange
            var dataTable = new DataTable();

            string columnName = "Column1";
            var    dataColumn = new DataColumn(columnName);

            dataTable.Columns.Add(dataColumn);

            var dataRow = dataTable.NewRow();

            var expectedValue = Guid.NewGuid().ToString();

            dataRow[columnName] = Guid.NewGuid().ToString();

            // Action
            DataRowExtensions.AssertAreEqual(dataRow, columnName, expectedValue);
        }