Ejemplo n.º 1
0
        public void OnFilterTextChanged_AppliesFilterToIdentifiers_Test()
        {
            var items = new[]
            {
                new SnpViewModel(TestSnpModel.Create("rs001"), null),
                new SnpViewModel(TestSnpModel.Create("rs002"), null)
            };
            var source = new SnpCollectionViewSource {
                Source = items
            };

            source.FilterText = "rs001";

            AssertSame(source.View, items[0]);
        }
Ejemplo n.º 2
0
        public void OnFilterTextChanged_WhenNull_DoesNotApplyAnyFilter_Test()
        {
            var items = new[]
            {
                new SnpViewModel(TestSnpModel.Create("rs001"), null),
                new SnpViewModel(TestSnpModel.Create("rs002"), null),
                new SnpViewModel(TestSnpModel.Create("rs003"), null)
            };
            var source = new SnpCollectionViewSource {
                Source = items
            };

            source.FilterText = String.Empty;

            AssertSame(source.View, items);
        }
Ejemplo n.º 3
0
        public void OnShowFavouritesChanged_ApplyFilterToFavourites_Test()
        {
            var items = new[]
            {
                new SnpViewModel(TestSnpModel.Create("rs001"), null),
                new SnpViewModel(TestSnpModel.Create("rs002"), null)
                {
                    IsFavourite = true
                }
            };
            var source = new SnpCollectionViewSource {
                Source = items
            };

            source.ShowFavourites = true;

            AssertSame(source.View, items[1]);
        }
Ejemplo n.º 4
0
        public void Ctor_CorrectlyInitializesMembers_Test()
        {
            var actual = new SnpCollectionViewSource();

            Assert.Null(actual.FilterText);
        }