Ejemplo n.º 1
0
        public void InsertPropertyTest1()
        {
            var wrapper = new CsvRecordWrapper();

            const string prop1Name = "Prop1";
            const string prop2Name = "Prop2";


            var prop1 =
                new CsvProperty(prop1Name, new string[] { "Hallo1" },
                                Converters.CsvConverterFactory.CreateConverter(Converters.CsvTypeCode.String, true));

            var prop2 =
                new CsvProperty(prop2Name, new string[] { "Hallo2" },
                                Converters.CsvConverterFactory.CreateConverter(Converters.CsvTypeCode.String, true));

            wrapper.AddProperty(prop2);
            Assert.AreEqual(1, wrapper.Count);
            Assert.AreEqual(prop2Name, wrapper.PropertyNames[0]);

            wrapper.InsertProperty(0, prop1);

            Assert.AreEqual(2, wrapper.Count);
            Assert.AreEqual(prop1Name, wrapper.PropertyNames[0]);
            Assert.AreEqual(prop2Name, wrapper.PropertyNames[1]);
        }
Ejemplo n.º 2
0
        public void InsertPropertyTest4()
        {
            var wrapper = new CsvRecordWrapper();

            const string prop1Name = "Prop1";


            var prop1 =
                new CsvProperty(prop1Name, new string[] { "Hallo1" },
                                Converters.CsvConverterFactory.CreateConverter(Converters.CsvTypeCode.String, true));


            wrapper.InsertProperty(4711, prop1);
        }
Ejemplo n.º 3
0
        public void InsertPropertyTest3()
        {
            var wrapper = new CsvRecordWrapper();

            wrapper.InsertProperty(0, null !);
        }