Exemplo n.º 1
0
        public void FindByLevelTest()
        {
            // List<TaxClassification> taxClassList = dataServiceTestCases.FindAllEntities(new TaxClassification()) as List<TaxClassification>;
            IEnumerable <IEntity> taxClassList = dataServiceTestCases.FindAllEntities(new TaxClassification());

            try
            {
                //TaxClassification taxClassification = new TaxClassification
                //{
                //    Level = taxClassList[0].Level
                //};
                string lvl = "";
                foreach (TaxClassification tx in taxClassList)
                {
                    lvl = tx.Level;
                    break;
                }

                TaxClassification taxClassification = new TaxClassification
                {
                    Level = lvl
                };
                IEnumerable <IEntity> taxClassifications = dataServiceTestCases.FindByLevelEntities(taxClassification);
                Assert.IsNotNull(taxClassifications);
                Assert.IsTrue(taxClassifications.Count() > 0);
            }
            catch (System.Exception ex)
            {
                Assert.Fail(ex.ToString());
            }
        }
 public void FindByLevelTest()
 {
     List<TaxClassification> taxClassList = dataServiceTestCases.FindAllEntities(new TaxClassification()) as List<TaxClassification>;
     try
     {
         TaxClassification taxClassification = new TaxClassification
         {
             Level = taxClassList[0].Level
         };
         IEnumerable<IEntity> taxClassifications = dataServiceTestCases.FindByLevelEntities(taxClassification);
         Assert.IsNotNull(taxClassifications);
         Assert.IsTrue(taxClassifications.Count() > 0);
     }
     catch (System.Exception ex)
     {
         Assert.Fail(ex.ToString());
     }
 }