コード例 #1
0
        public void Test_For_ShouldReturnSampleItemWithCorrectProperties_WhenTitleIsNull()
        {
            // When
            var sampleItem = SampleItem.For <ContentPage>();

            // Then
            sampleItem.Should().NotBeNull();
            sampleItem.Title.Should().Be("ContentPage");
            sampleItem.PageType.Should().Be(typeof(ContentPage));
        }
コード例 #2
0
        public App()
        {
            InitializeComponent();

            var items = new List <SampleItem> {
                SampleItem.For <Page>("Page 1"),
                SampleItem.For <Page>("Page 2"),
                SampleItem.For <Page>("Page 3")
            };

            MainPage = new NavigationPage(new MainPage(items));
        }
コード例 #3
0
        public App()
        {
            InitializeComponent();

            var items = new List <SampleItem> {
                SampleItem.For <PressedStateButtonPage>("Button with pressed state"),
                SampleItem.For <RoundedContentViewPage>("ContentView with rounded border"),
                SampleItem.For <CarouselPageWithFooterPage>("CarouselPage with footer")
            };

            MainPage = new NavigationPage(new MainPage(items));
        }
コード例 #4
0
        public void Test_For_ShouldReturnSampleItemWithCorrectProperties_WhenTitleIsDefined()
        {
            // Given
            const string PAGE_TITLE = "Content Page";

            // When
            var sampleItem = SampleItem.For <ContentPage>(PAGE_TITLE);

            // Then
            sampleItem.Should().NotBeNull();
            sampleItem.Title.Should().Be(PAGE_TITLE);
            sampleItem.PageType.Should().Be(typeof(ContentPage));
        }