Map equality using Hamcrest

后端 未结 8 2007
鱼传尺愫
鱼传尺愫 2021-02-06 20:25

I\'d like to use hamcrest to assert that two maps are equal, i.e. they have the same set of keys pointing to the same values.

My current best guess is:

a         


        
8条回答
  •  攒了一身酷
    2021-02-06 21:18

    Hamcrest now has a Matcher for size collection.

    org.hamcrest.collection.IsCollectionWithSize

提交回复
热议问题