Beispiel #1
0
        public async Task VerticalTextAlignmentInitializesCorrectily()
        {
            var xplatVerticalTextAlignment = TextAlignment.End;

            var entry = new EntryStub
            {
                Text = "Test",
                VerticalTextAlignment = xplatVerticalTextAlignment
            };

            UIControlContentVerticalAlignment expectedValue = UIControlContentVerticalAlignment.Bottom;

            var values = await GetValueAsync(entry, (handler) =>
            {
                return(new
                {
                    ViewValue = entry.VerticalTextAlignment,
                    PlatformViewValue = GetNativeVerticalTextAlignment(handler)
                });
            });

            Assert.Equal(xplatVerticalTextAlignment, values.ViewValue);
            values.PlatformViewValue.AssertHasFlag(expectedValue);
        }
Beispiel #2
0
        public async Task VerticalTextAlignmentInitializesCorrectly()
        {
            var xplatVerticalTextAlignment = TextAlignment.End;

            var searchBarStub = new SearchBarStub()
            {
                Text = "Test",
                VerticalTextAlignment = xplatVerticalTextAlignment
            };

            UIControlContentVerticalAlignment expectedValue = UIControlContentVerticalAlignment.Bottom;

            var values = await GetValueAsync(searchBarStub, (handler) =>
            {
                return(new
                {
                    ViewValue = searchBarStub.VerticalTextAlignment,
                    NativeViewValue = GetNativeVerticalTextAlignment(handler)
                });
            });

            Assert.Equal(xplatVerticalTextAlignment, values.ViewValue);
            values.NativeViewValue.AssertHasFlag(expectedValue);
        }