Beispiel #1
0
        public void GetFieldsByModelIdTest()
        {
            MockDb.Setup(x => x.Fetch <ModelField>(It.IsAny <string>(), It.IsAny <object[]>())).Returns(new List <ModelField>()
            {
                new ModelField()
                {
                    ModelFieldId = 1
                }
            });

            var results = ModelField.GetFieldsByModelId(MockDb.Object, 1);

            Assert.AreEqual(1, results.Item[0].ModelFieldId);
        }
 public ReturnResult <List <ModelField> > GetModelFields(int modelId)
 {
     return(ModelField.GetFieldsByModelId(Db, modelId));
 }