public void CreateUniqueNameTest() { report = new Report(); Base page = new ReportPage(); page.Name = "Page1"; report.AddChild(page); page = new ReportPage(); page.CreateUniqueName(); report.AddChild(page); Assert.NotEqual(report.Pages[0].Name, report.Pages[1].Name); }
public void ClearTest() { report = new Report(); Base page = new ReportPage(); page.Name = "Page1"; report.AddChild(page); page = new ReportPage(); page.CreateUniqueName(); report.AddChild(page); report.Clear(); Base foundedPage = report.FindObject("Page1"); Assert.True(foundedPage == null); }
public void FindObjectTest() { report = new Report(); Base page = new ReportPage(); page.Name = "TestPage"; report.AddChild(page); Base foundedPage = report.FindObject("TestPage"); Assert.Equal(page, foundedPage); }
public void AddPageFindObjectTest(string pageName) { report = new Report(); ReportPage page = new ReportPage(); page.Name = pageName; report.AddChild(page); Base foundedPage = report.FindObject(pageName); if (foundedPage != null) { Assert.Equal(page, foundedPage); } }
public override void VisitEntityGroup(UTinyEntityGroup entityGroup) { var begin = Writer.Length; Writer.Line($"{UTinyHTML5Builder.KEntityGroupNamespace}.{Module.Namespace}.{entityGroup.Name}.name = {EscapeJsString(entityGroup.Name)};"); Writer.WriteRaw($"{UTinyHTML5Builder.KEntityGroupNamespace}.{Module.Namespace}.{entityGroup.Name}.load = "); WriteEntityGroupSetupFunction(Writer, Project, entityGroup, WriteEntityGroupComponent, WriteEntityLayer); Report.AddChild(entityGroup.Name, System.Text.Encoding.ASCII.GetBytes(Writer.Substring(begin))); #if UNITY_EDITOR_WIN Writer.Length -= 2; #else Writer.Length -= 1; #endif }