public void BusinessLogicClass_Context_DAL_Name()
        {
            BusinessLogicContext context = new BusinessLogicContext(typeof(object), "Foo");
            Assert.AreEqual("Foo", context.NameAndDataAccessLayerName);

            LinqToSqlContext ltsContext = new LinqToSqlContext(typeof(DataTests.Northwind.LTS.NorthwindDataContext));
            Assert.AreEqual("NorthwindDataContext (LINQ to SQL)", ltsContext.NameAndDataAccessLayerName);

            LinqToEntitiesContext efContext = new LinqToEntitiesContext(typeof(NorthwindEntities));
            Assert.AreEqual("NorthwindEntities (Entity Framework)", efContext.NameAndDataAccessLayerName);
        }
Ejemplo n.º 2
0
        public void BusinessLogicClass_Context_DAL_Name()
        {
            BusinessLogicContext context = new BusinessLogicContext(typeof(object), "Foo");

            Assert.AreEqual("Foo", context.NameAndDataAccessLayerName);

            LinqToSqlContext ltsContext = new LinqToSqlContext(typeof(DataTests.Northwind.LTS.NorthwindDataContext));

            Assert.AreEqual("NorthwindDataContext (LINQ to SQL)", ltsContext.NameAndDataAccessLayerName);

            LinqToEntitiesContext efContext = new LinqToEntitiesContext(typeof(NorthwindEntities));

            Assert.AreEqual("NorthwindEntities (Entity Framework)", efContext.NameAndDataAccessLayerName);
        }