Azavea.Open.DAO.Tests.CriteriaTests.TestSerialize C# (CSharp) Method

TestSerialize() private method

private TestSerialize ( ) : void
return void
        public void TestSerialize()
        {
            DaoCriteria sc = new DaoCriteria();
            sc.Orders.Add(new SortOrder("X", SortType.Asc));
            sc.Expressions.Add(new EqualExpression("X", "1", true));

            try
            {
                MemoryStream ms = new MemoryStream();
                BinaryFormatter formatter = new BinaryFormatter();
                formatter.Serialize(ms, sc);
                ms.Close();
                ms.Dispose();
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.Message);
            }
        }