Exemple #1
0
 public CollectionMvcBuilder <TItem> BuildBuilder <TItem>(BuilderMocks <TItem> mocks)
     where TItem : class, IEntity
 {
     return(new CollectionMvcBuilder <TItem>
            (
                mocks.CreateViewModel.Object,
                mocks.CreatePage.Object,
                mocks.CreatePageController.Object
            ));
 }
Exemple #2
0
        public async Task Build()
        {
            var pageTitle = "TheTitle";
            var mocks     = new BuilderMocks <Uom>();

            Setup(mocks, pageTitle);
            var builder = BuildBuilder(mocks);

            await builder.BuildAsync(mocks.LrpNavigation.Object, pageTitle);
        }
Exemple #3
0
 public void Setup <TItem>(BuilderMocks <TItem> mocks, string pageTitle)
     where TItem : class, IEntity
 {
     mocks.CreateViewModel.Setup(f => f(pageTitle)).Returns(mocks.ViewModel.Object);
     mocks.CreatePage.Setup(f => f()).Returns(mocks.Page.Object);
     mocks.CreatePageController
     .Setup(f => f(mocks.LrpNavigation.Object, mocks.ViewModel.Object, mocks.Page.Object))
     .Returns(mocks.PageController.Object);
     mocks.Page.Setup(p => p.InitializePage());
     mocks.Page.SetupSet(p => p.BindingContext = mocks.ViewModel.Object);
     mocks.LrpNavigation.Setup(n => n.PushAsync(mocks.Page.Object as ContentPage)).Returns(Task.CompletedTask);
 }