Accord.Tests.Statistics.ProjectionFilterTest.ApplyTest C# (CSharp) Method

ApplyTest() private method

private ApplyTest ( ) : void
return void
        public void ApplyTest()
        {
            DataTable table = CreateTable();

            // Show the start data
            // Accord.Controls.DataGridBox.Show(table);

            // Create a new data projection (column) filter
            var filter = new Projection("Floors", "Finished");

            // Apply the filter and get the result
            DataTable result = filter.Apply(table);

            // Show it
            // Accord.Controls.DataGridBox.Show(result);

            Assert.AreEqual(2, result.Columns.Count);
            Assert.AreEqual(5, result.Rows.Count);

            Assert.AreEqual("Floors", result.Columns[0].ColumnName);
            Assert.AreEqual("Finished", result.Columns[1].ColumnName);
        }
    }
ProjectionFilterTest