Exemplo n.º 1
0
        public void InsertCopy_EmptyObject_AddNotSystemParam()
        {
            var systemParams = new SystemParams();
            int expectedCountOfParameters = 0;

            var insertedItem = systemParams.InsertCopy(new SystemParams());

            Assert.IsNull(insertedItem);
            Assert.AreEqual(expectedCountOfParameters, systemParams.Count);
        }
Exemplo n.º 2
0
        public void InsertCopy_EmptyObject_AddNewSystemParam()
        {
            var          systemParams            = new SystemParams();
            const string paramName               = "Параметр 1";
            var          systemParam             = new SystemParam(systemParams.GetIdx, paramName);
            const int    expectedParametersCount = 1;

            var insertedItem = systemParams.InsertCopy(systemParam);

            Assert.IsTrue(insertedItem.DisplayText[0].Contains(paramName));
            Assert.AreEqual(expectedParametersCount, systemParams.Count);
        }