예제 #1
0
        public void ProcessValueItemPropertyTestDispVal()
        {
            //Arrange
            ValueItem valueItem = new ValueItem();

            ValueItemPropertyReader.ProcessValueItemProperty(valueItem, "DisplayValue", "\"abc\"");
            string expectedResult = "abc";
            //Act
            string actualResult = valueItem.DispVal;

            //Assert
            Assert.AreEqual(expectedResult, actualResult);
        }
예제 #2
0
        public void ProcessValueItemInstanceProperty()
        {
            // Arrange
            Dictionary <string, ValueItem> valueItems = new Dictionary <string, ValueItem>();

            valueItems.Add("ValueItem_1_Column_1_TDBGrid", new ValueItem());
            string expectedResult = "Valor11";

            // Act
            ValueItemPropertyReader.ProcessValueItemInstanceProperty(valueItems, "this.ValueItem_1_Column_1_TDBGrid.DisplayValue = \"Valor11\";");
            string actualResult = valueItems["ValueItem_1_Column_1_TDBGrid"].DispVal;

            //Assert
            Assert.AreEqual(expectedResult, actualResult);
        }