public void HelpViewModel_OnViewLoaded_HelpViewIsNull_IsViewAvailableIsFalse()
        {
            //------------Setup for test--------------------------
            var helpViewModel = new HelpViewModel(null, false);

            //------------Execute Test---------------------------
            helpViewModel.OnViewisLoaded(null);
            //------------Assert Results-------------------------
            Assert.AreEqual(null, helpViewModel.HelpViewWrapper);
            Assert.IsFalse(helpViewModel.IsViewAvailable);
        }
Esempio n. 2
0
 public void HelpViewModel_OnViewLoaded_HelpViewIsNull_IsViewAvailableIsFalse()
 {
     //------------Setup for test--------------------------
     //const string uri = "http://community.warewolf.io/";
     var networkHelper = new Mock<INetworkHelper>();
     var helpViewModel = new HelpViewModel(networkHelper.Object,null, false);
     //------------Execute Test---------------------------
     helpViewModel.OnViewisLoaded(null);
     //------------Assert Results-------------------------
     Assert.AreEqual(null, helpViewModel.HelpViewWrapper);
     Assert.IsFalse(helpViewModel.IsViewAvailable);
 }
        public void HelpViewModel_OnViewLoaded_ValidHelpView_HelpViewIsSet()
        {
            //------------Setup for test--------------------------
            var helpViewModel   = new HelpViewModel(null, true);// { Uri = uri };
            var helpViewWrapper = new Mock <IHelpViewWrapper>();

            //------------Execute Test---------------------------
            helpViewModel.OnViewisLoaded(helpViewWrapper.Object);
            //------------Assert Results-------------------------
            Assert.AreEqual(helpViewWrapper.Object, helpViewModel.HelpViewWrapper);
            Assert.IsTrue(helpViewModel.IsViewAvailable);
        }
Esempio n. 4
0
 public void HelpViewModel_OnViewLoaded_ValidHelpView_HelpViewIsSet()
 {
     //------------Setup for test--------------------------
    // const string uri = "http://community.warewolf.io/";
     var networkHelper = new Mock<INetworkHelper>();
     var helpViewModel = new HelpViewModel(networkHelper.Object,null, true);// { Uri = uri };
     var helpViewWrapper = new Mock<IHelpViewWrapper>(); 
     //------------Execute Test---------------------------
     helpViewModel.OnViewisLoaded(helpViewWrapper.Object);
     //------------Assert Results-------------------------
     Assert.AreEqual(helpViewWrapper.Object, helpViewModel.HelpViewWrapper);
     Assert.IsTrue(helpViewModel.IsViewAvailable);
 }
Esempio n. 5
0
        public void HelpViewModel_OnViewLoaded_HelpViewIsNull_IsViewAvailableIsFalse()
        {
            //------------Setup for test--------------------------
            //const string uri = "http://community.warewolf.io/";
            var networkHelper = new Mock <INetworkHelper>();
            var helpViewModel = new HelpViewModel(networkHelper.Object, null, false);

            //------------Execute Test---------------------------
            helpViewModel.OnViewisLoaded(null);
            //------------Assert Results-------------------------
            Assert.AreEqual(null, helpViewModel.HelpViewWrapper);
            Assert.IsFalse(helpViewModel.IsViewAvailable);
        }
Esempio n. 6
0
        public void HelpViewModel_OnViewLoaded_ValidHelpView_HelpViewIsSet()
        {
            //------------Setup for test--------------------------
            // const string uri = "http://community.warewolf.io/";
            var networkHelper   = new Mock <INetworkHelper>();
            var helpViewModel   = new HelpViewModel(networkHelper.Object, null, true);// { Uri = uri };
            var helpViewWrapper = new Mock <IHelpViewWrapper>();

            //------------Execute Test---------------------------
            helpViewModel.OnViewisLoaded(helpViewWrapper.Object);
            //------------Assert Results-------------------------
            Assert.AreEqual(helpViewWrapper.Object, helpViewModel.HelpViewWrapper);
            Assert.IsTrue(helpViewModel.IsViewAvailable);
        }