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)); }
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)); }
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)); }
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)); }