Exemplo n.º 1
0
 public void SetUp()
 {
     // This test uses a 11x16 font.
     styleSystem         = LayoutTestStyle.CreateStyleSystem();
     textStyleDefinition = styleSystem.StylesFor <TextStyleDefinition>();
     textStyle           = LayoutTestStyle.CreateTextStyle(styleSystem);
 }
Exemplo n.º 2
0
        public void TestBuildComplexRule()
        {
            var b = new StyleBuilder(LayoutTestStyle.CreateStyleSystem());

            var step2 = b.SelectForType <Button>().WithDirectChild(b.SelectForType <IconLabel>()).WithDirectChild(b.SelectForType <Label>());

            step2.ToString().Should().Be("Button > IconLabel > Label");
        }
Exemplo n.º 3
0
        public void TestBuildSimple()
        {
            var b = new StyleBuilder(LayoutTestStyle.CreateStyleSystem());

            var step2 = b.SelectForType <Button>().WithDirectChild(b.SelectForType <IconLabel>());

            step2.Should().BeAssignableTo <DescendantSelector>().Which.Selector.ToString().Should().Be("IconLabel");
            step2.Should().BeAssignableTo <DescendantSelector>().Which.AnchestorSelector.ToString().Should().Be("Button");
            step2.ToString().Should().Be("Button > IconLabel");
        }
Exemplo n.º 4
0
        public void SetUp()
        {
            Count       = 0;
            styleSystem = LayoutTestStyle.CreateStyleSystem();
            var textStyle = LayoutTestStyle.CreateTextStyle(styleSystem);

            var documentView = Substitute.For <IDocumentView <ITextDocument> >();

            documentView.Document.Returns((ITextDocument)null);
            documentView.Style.Returns(textStyle);
            this.doc = documentView;
        }
Exemplo n.º 5
0
 public TextChunkTest()
 {
     styleSystem = LayoutTestStyle.CreateStyleSystem();
     textStyle   = LayoutTestStyle.CreateTextStyle(styleSystem);
 }