public void GetSchema() { var response = new MockClient().GetSchema(_testSchemaCode); //临时记录 _schemaDto = response; Assert.NotNull(response); Assert.Equal(_testSchemaCode, response.SchemaCode); Assert.Equal("哈哈", response.Name); }
/// <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); }
/// <summary> /// 创建 /// </summary> /// <param name="dto"></param> /// <returns></returns> public bool AddSchema(SchemaDTO dto) { MockDatabase.Schema.Add(dto); return(true); }