public void OrphanSlotPrintsItself() { var document = new Document(new MyPage(), BaseModeController.DefaultKeepAliveInterval); var builder = new LaraBuilder(document.Body); builder.Push("slot", "lalala").Pop(); var writer = new DocumentWriter(document); writer.Print(); var html = writer.ToString(); Assert.Contains("lalala", html); }
public void SlotsPrintHostElements() { var document = new Document(new MyPage(), BaseModeController.DefaultKeepAliveInterval); var builder = new LaraBuilder(document.Body); builder.Push("x-slotter") .Push("div", "lalala") .AppendText("hello") .Pop() .Pop(); var writer = new DocumentWriter(document); writer.Print(); var html = writer.ToString(); Assert.Contains("lalala", html); Assert.Contains("hello", html); Assert.DoesNotContain("x-slotter", html); }