Esempio n. 1
0
        public void GetSchema()
        {
            var response = new MockClient().GetSchema(_testSchemaCode);

            //临时记录
            _schemaDto = response;
            Assert.NotNull(response);
            Assert.Equal(_testSchemaCode, response.SchemaCode);
            Assert.Equal("哈哈", response.Name);
        }
Esempio n. 2
0
        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        public bool UpdateSchema(SchemaDTO dto)
        {
            var entity = MockDatabase.Schema?.FirstOrDefault(a => a.SchemaCode == dto.SchemaCode);

            if (entity != null)
            {
                entity.Name = dto.Name;
                return(true);
            }
            return(false);
        }
Esempio n. 3
0
 /// <summary>
 /// 创建
 /// </summary>
 /// <param name="dto"></param>
 /// <returns></returns>
 public bool AddSchema(SchemaDTO dto)
 {
     MockDatabase.Schema.Add(dto);
     return(true);
 }