public void QueryUsingAccountInfo()
        {
            using (ISession s = OpenSession())
            {
                CustomerFinder finder = new CustomerFinder();
                finder.AccountActive  = true;
                finder.AccountSizeMin = 10000d;

                log.Debug("--- Run the query with IsActive and Size are taken into account ---");
                IList <Customer> list = finder.Find(s);
                Assert.AreEqual(2, list.Count);

                log.Debug("--- Run the query with IsActive, Size and Opened are taken into account ---");
                finder.AccountOpenedStart = DateTime.Parse("1/1/1983");
                finder.AccountOpenedEnd   = DateTime.Parse("1/1/1984");

                IList <Customer> list2 = finder.Find(s);
                Assert.AreEqual(1, list2.Count);
            }
        }
        public void QueryAndTheResultHasNotDistinct()
        {
            using (ISession s = OpenSession())
            {
                CustomerFinder finder = new CustomerFinder();
                finder.AccountMoney = MoneyType.Dollar;

                IList <Customer> list = finder.Find(s);
                Assert.AreEqual(4, list.Count);
            }
        }
        public void FirstName()
        {
            using (ISession s = OpenSession())
            {
                CustomerFinder finder = new CustomerFinder();

                finder.FirstName    = "Jo";
                finder.AccountMoney = MoneyType.Euro;

                IList <Customer> list = finder.Find(s);

                Assert.AreEqual(2, list.Count);
            }
        }