public void KleenStar_EmptyLanguage() { var element = ReFactory.NewKleeneStar(ReEmptyLanguage.Instance); Assert.That(element, Is.Not.Null); Assert.That(element, Is.TypeOf(typeof(ReEmptyLanguage))); }
public void KleenStar_EmptyString() { var empty = ReEmptyString.Instance; var element = ReFactory.NewKleeneStar(empty); Assert.That(element, Is.SameAs(empty)); }
public void KleeneStar_NestedKleenStar() { var child = ReUtils.NewDummy('1'); var subStar = new ReKleeneStar(child); var element = ReFactory.NewKleeneStar(subStar); Assert.That(element, Is.SameAs(subStar)); }
public void KleenStar_NonNested() { var child = ReUtils.NewDummy('1'); var element = ReFactory.NewKleeneStar(child); Assert.That(element, Is.Not.Null); Assert.That(element, Is.TypeOf(typeof(ReKleeneStar))); var star = (ReKleeneStar)element; Assert.That(star.Element, Is.SameAs(child)); }