Dev2.Core.Tests.DataListViewModelTests.RemoveRowIfEmpty_ExpectedCountofDataListItemsReduceByOne C# (CSharp) Method

RemoveRowIfEmpty_ExpectedCountofDataListItemsReduceByOne() private method

        public void RemoveRowIfEmpty_ExpectedCountofDataListItemsReduceByOne()
        {
            Setup();
            _dataListViewModel.AddBlankRow(new DataListItemModel("Test"));
            int beforeCount = _dataListViewModel.ScalarCollection.Count;
            _dataListViewModel.ScalarCollection[0].Description = string.Empty;
            _dataListViewModel.ScalarCollection[0].DisplayName = string.Empty;
            _dataListViewModel.RemoveBlankRows(_dataListViewModel.ScalarCollection[0]);
            int afterCount = _dataListViewModel.ScalarCollection.Count;

            Assert.IsTrue(beforeCount > afterCount);
        }
DataListViewModelTests