public void TearDown()
 {
     this.navigationService         = null;
     this.pageDialogService         = null;
     this.subscribeManager          = null;
     this.pushRegisterPageViewModel = null;
 }
        public void SetUp()
        {
            this.navigationService         = new Mock <INavigationService>();
            this.pageDialogService         = new Mock <IPageDialogService>();
            this.subscribeManager          = new Mock <ISubscribeManager>();
            this.pushRegisterPageViewModel = new PushRegisterPageViewModel(this.navigationService.Object, this.pageDialogService.Object, this.subscribeManager.Object);

            // カテゴリ登録テスト用
            this.subscribeCategories.Add(new SubscribeCategory("JapaneseFood", "和食", true));
            this.subscribeCategories.Add(new SubscribeCategory("FrenchFood", "フレンチ", false));
            this.subscribeCategories.Add(new SubscribeCategory("ChineseFood", "中華", false));
        }
        public void PushRegisterPageViewModel_RegisterCommandユーザ登録テスト()
        {
            this.subscribeManager.Setup(m => m.Register(It.IsAny <SubscribeUser>()));
            this.subscribeManager.Verify();
            this.pushRegisterPageViewModel = new PushRegisterPageViewModel(this.navigationService.Object, this.pageDialogService.Object, this.subscribeManager.Object);
            var command = this.pushRegisterPageViewModel.RegisterCommand;

            command.Execute(this.buttonTypes[0]);
            Assert.IsNotNull(command);
            Assert.IsTrue(command.CanExecute());

            this.pageDialogService.Verify(m => m.DisplayAlertAsync(Message.Register, Message.Ok, Message.Ok), Times.AtMostOnce());
        }