public void MaterialsWeightEntitiesTest_CheckConnection_Success()
        {
            var materialsWeightEntities = new MaterialsWeightEntities();

            Assert.IsNotNull(materialsWeightEntities.Database.Connection, "There should be connection to the database");
            Assert.IsNotNull(materialsWeightEntities.Categories, "There should be categories in the database");
            Assert.IsNotNull(materialsWeightEntities.Subcategories, "There should be subcategories in the database");
            Assert.IsNotNull(materialsWeightEntities.Materials, "There should be materials in the database");
        }
示例#2
0
        public MaterialList()
        {
            Materials = new List <Material>();
            MaterialsWeightEntities materialsWeightEntities = new MaterialsWeightEntities();

            foreach (var material in materialsWeightEntities.Materials)
            {
                Materials.Add(material);
            }
        }
示例#3
0
        public CategoryList()
        {
            Categories = new List <Category>();
            MaterialsWeightEntities materialsWeightEntities = new MaterialsWeightEntities();

            foreach (var category in materialsWeightEntities.Categories)
            {
                Categories.Add(category);
            }
        }
示例#4
0
        public SubcategoryList()
        {
            Subcategories = new List <Subcategory>();
            MaterialsWeightEntities materialsWeightEntities = new MaterialsWeightEntities();

            foreach (var subcategory in materialsWeightEntities.Subcategories)
            {
                Subcategories.Add(subcategory);
            }
        }