Esempio n. 1
0
        public void Register_WhenAlreadyInitialized_ShouldCallChildrenInitialize(
            TestViewModel sut,
            Mock <ViewModelBase> child,
            INavigationRequest request)
        {
            //arrange
            child.As <IViewModel>();
            sut.Initialize(request);

            //act
            sut.CallRegisterChild(child.Object);

            //assert
            child.As <IViewModel>().Verify(c => c.Initialize(request), Times.Once());
        }
Esempio n. 2
0
 public void Initialize_GuardClauses(
     TestViewModel sut,
  GuardClauseAssertion assertion)
 {
     assertion.Verify((INavigationRequest request) => sut.Initialize(request));
 }
Esempio n. 3
0
        public void Register_WhenAlreadyInitialized_ShouldCallChildrenInitialize(
         TestViewModel sut,
            Mock<ViewModelBase> child,
            INavigationRequest request)
        {
            //arrange
            child.As<IViewModel>();
            sut.Initialize(request);

            //act
            sut.CallRegisterChild(child.Object);

            //assert
            child.As<IViewModel>().Verify(c => c.Initialize(request), Times.Once());
        }
Esempio n. 4
0
 public void Initialize_GuardClauses(
     TestViewModel sut,
     GuardClauseAssertion assertion)
 {
     assertion.Verify((INavigationRequest request) => sut.Initialize(request));
 }