Ejemplo n.º 1
0
        public void DataGridViewExtensionsClass_AddColumnsForSegmentsMethod_ThrowsArgumentNullException_IfFirstParameterIsNull()
        {
            DataGridView testObject = null;
            IEnumerable <TrainSegmentModel> testParam1 = Array.Empty <TrainSegmentModel>();
            int testParam2 = _rnd.Next();
            int testParam3 = _rnd.Next();
            int testParam4 = _rnd.Next();
            int testParam5 = _rnd.Next();
            int testParam6 = _rnd.Next();
            int testParam7 = _rnd.Next();

            testObject.AddColumnsForSegments(testParam1, testParam2, testParam3, testParam4, testParam5, testParam6, testParam7);

            Assert.Fail();
        }
Ejemplo n.º 2
0
        public void DataGridViewExtensionsClass_AddColumnsForSegmentsMethod_ThrowsArgumentNullExceptionWithCorrectParamNameProperty_IfFirstParameterIsNull()
        {
            DataGridView testObject = null;
            IEnumerable <TrainSegmentModel> testParam1 = Array.Empty <TrainSegmentModel>();
            int testParam2 = _rnd.Next();
            int testParam3 = _rnd.Next();
            int testParam4 = _rnd.Next();
            int testParam5 = _rnd.Next();
            int testParam6 = _rnd.Next();
            int testParam7 = _rnd.Next();

            try
            {
                testObject.AddColumnsForSegments(testParam1, testParam2, testParam3, testParam4, testParam5, testParam6, testParam7);
                Assert.Fail();
            }
            catch (ArgumentNullException ex)
            {
                Assert.AreEqual("grid", ex.ParamName);
            }
        }