コード例 #1
0
        public void SameAs_OneHasMoreTextValues_False()
        {
            var first  = new DataSet();
            var second = new DataSet();

            first.AddLanguageString("one", "a value", "en", false);
            first.AddLanguageString("one", "another value", "fr", false);
            second.AddLanguageString("one", "a value", "en", false);
            Assert.That(first.SameAs(second), Is.False);
        }
コード例 #2
0
        public void SameAs_OneHasExtraTextValue_False()
        {
            var first  = new DataSet();
            var second = new DataSet();

            first.AddLanguageString("one", XmlString.FromXml("a value"), "en", false);
            Assert.That(first.SameAs(second), Is.False);
        }
コード例 #3
0
        public void SameAs_OneHasDifferentLanguage_False()
        {
            var first  = new DataSet();
            var second = new DataSet();

            first.AddLanguageString("one", "a value", "en", false);
            second.AddLanguageString("one", "a value", "de", false);
            Assert.That(first.SameAs(second), Is.False);
        }
コード例 #4
0
        public void SameAs_DifferentKeys_False()
        {
            var first  = new DataSet();
            var second = new DataSet();

            first.AddLanguageString("one", XmlString.FromXml("a value"), "en", false);
            second.AddLanguageString("two", XmlString.FromXml("a value"), "en", false);
            Assert.That(first.SameAs(second), Is.False);
        }
コード例 #5
0
        private static DataSet MakeComplexDataSet()
        {
            var ds = new DataSet();

            ds.AddLanguageString("one", "a value", "en", false);
            ds.AddLanguageString("one", "another value", "de", false);
            ds.AddLanguageString("two", "another value", "fr", false);
            var values = new HashSet <KeyValuePair <string, string> >();

            values.Add(new KeyValuePair <string, string>("key", "value"));
            ds.UpdateXmatterPageDataAttributeSet("one", values);
            DataSetElementValue dsv = ds.TextVariables["one"];

            dsv.SetAttributeList("en", MakeList("attr1", "val1", "attr2", "val2"));
            dsv.SetAttributeList("de", MakeList("attr1", "val1de", "attr3", "val3de"));
            DataSetElementValue dsv2 = ds.TextVariables["one"];

            dsv2.SetAttributeList("fr", MakeList("attr1", "val1fr", "attr4", "val4"));
            return(ds);
        }