예제 #1
0
            public void SetsSearchTextToSearchWhenSearchTextIsEmpty()
            {
                //arrange
                var vm = new HostViewModel {
                    SearchText = string.Empty
                };

                //act
                vm.SearchLostFocus(null);

                //assert
                Assert.Equal("Search", vm.SearchText);
            }
예제 #2
0
            public void DoesntModifySearchTextIfSearchTextIsntEmpty()
            {
                //arrange
                var vm = new HostViewModel {
                    SearchText = "Some String"
                };

                //act
                vm.SearchLostFocus(null);

                //assert
                Assert.Equal("Some String", vm.SearchText);
            }