public void CreateTest()
        {
            //Arrange
            DBTaskMaterial taskMaterial = new DBTaskMaterial();
            var            Create       = new ModelLayer.Task();

            Create.id        = 1;
            Create.materials = new List <Tuple <Material, int> >();
            var item = Tuple.Create(new Material {
                id = 1
            }, 200);
            var item2 = Tuple.Create(new Material {
                id = 2
            }, 400);

            Create.materials.Add(item);
            Create.materials.Add(item2);


            //Act
            var succes = taskMaterial.Create(Create);

            //Assert
            Assert.IsTrue(succes);
        }
Ejemplo n.º 2
0
 public bool Create(Task obj)
 {
     return(db.Create(obj));
 }