public void CanGetFirstElementFromCollection() { XmlIncludeTypeData xmlIncludeType = new XmlIncludeTypeData("Bill", typeof(Object).AssemblyQualifiedName); XmlIncludeTypeDataCollection collection = new XmlIncludeTypeDataCollection(); collection.Add(xmlIncludeType); IEnumerator enumerator = collection.GetEnumerator(); enumerator.MoveNext(); Assert.AreEqual("Bill", ((XmlIncludeTypeData)enumerator.Current).Name); }
public void CanGetFirstElementFromCollection() { XmlIncludeTypeData xmlIncludeType = new XmlIncludeTypeData("Bill", typeof(Object).AssemblyQualifiedName); XmlIncludeTypeDataCollection collection = new XmlIncludeTypeDataCollection(); collection.Add(xmlIncludeType); IEnumerator enumerator = collection.GetEnumerator(); enumerator.MoveNext(); Assert.AreEqual("Bill", ((XmlIncludeTypeData)enumerator.Current).Name); }
public void EnumeratorTest() { XmlIncludeTypeData xmlIncludeType = new XmlIncludeTypeData("MyName", typeof(Object).AssemblyQualifiedName); xmlIncludeTypes.Add(xmlIncludeType); IEnumerator enumerator = xmlIncludeTypes.GetEnumerator(); enumerator.Reset(); while (enumerator.MoveNext()) { Assert.IsNotNull(enumerator.Current); } }