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); }
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); }
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); }
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); }
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); }