Ejemplo n.º 1
0
        public void WithNoValuesReturnsCorrectly()
        {
            var styles = new StyleCollection();

            var result = styles.ToString();

            Assert.AreEqual( string.Empty, result );
        }
Ejemplo n.º 2
0
        public void TestStyleCollection()
        {
            var indexGrama = new StyleCollection
            {
                ["a"] = "b",
                ["c"] = "d",
            };

            Assert.Equal("a:b;c:d", indexGrama.ToString());

            StyleCollection array = new[] { ("a", "b"), ("c", "d") };
Ejemplo n.º 3
0
        public void ReturnsCorrectly()
        {
            string definitionName1 = "DefinitionName1";
            string definitionValue1 = "DefinitionValue1";

            string definitionName2 = "DefinitionName2";
            string definitionValue2 = "DefinitionValue2";

            var styles = new StyleCollection();
            styles.Add( definitionName1, definitionValue1 );
            styles.Add( definitionName2, definitionValue2 );

            var result = styles.ToString();

            string expectedResult = string.Format( "{0}:{1};{2}:{3}", definitionName1, definitionValue1, definitionName2, definitionValue2 );
            Assert.AreEqual( expectedResult, result );
        }