IO存入读取带有层级结构的数据

来源:12-4 对外提供服务定义

夏目鲸鱼

2021-01-24

我有一个文件,以.feature为后缀,希望能根据缩进反序列化为Java的类,
如Feature类下包含

  • Background对象,
  • List<Scenario>对象
    • Scenario对象包含属性Given,When,Then,Tag(对应@done,@dev)
Feature: test category

  Background: the bearer token is valid
    Given the login api would be connected
    When the user logged in
    Then check if bearer token is available

  @done
  Scenario: check three has product
    Given PA list under category tree is given
    When loop the category tree
    Then every PA should not be empty

  @dev
  Scenario: check the product group under pa should not have duplicate product
    Given the following PA
      |0111|
#      |0231|
#      |0351|
#      |0511|
      |2018|
    When get product list group by main furnishing
    And check the product under every main furnishing group
    Then product under main furnishing group should not duplicate

写回答

1回答

张小喜

2021-02-17

什么样的场景下需要?

0
6
夏目鲸鱼
回复
张小喜
不是运行时的,静态文件
2021-02-18
共6条回复

Java高效编程技巧实践 告别996

可以改变的编程效率

1451 学习 · 326 问题

查看课程