public void ShouldCreateAnInstanceOfTheSpecifiedType() { Element element = KmlFactory.CreateElement(new XmlComponent(null, "test", "")); Assert.That(element, Is.Not.Null); Assert.That(element, Is.InstanceOf <ManuallyRegisteredElement>()); }
public void TestCreation() { Element element = KmlFactory.CreateElement(new XmlComponent(null, "test", string.Empty)); Assert.That(element, Is.Not.Null); Assert.That(element, Is.InstanceOf <TestElementClass1>()); }
public void ShouldReplaceTheSpecifiedType() { var component = new XmlComponent(null, "existing", ""); KmlFactory.Register <ExistingElement>(component); KmlFactory.Replace <ExistingElement, ReplacedElement>(); Element result = KmlFactory.CreateElement(component); Assert.That(result, Is.InstanceOf <ReplacedElement>()); }