(t *testing.T)
| 844 | } |
| 845 | |
| 846 | func TestHandleZeroAmount(t *testing.T) { |
| 847 | t.Run("Multiple distributions", func(t *testing.T) { |
| 848 | distributions := []Distribution{ |
| 849 | {Identifier: "id1"}, |
| 850 | {Identifier: "id2"}, |
| 851 | {Identifier: "id3"}, |
| 852 | } |
| 853 | result := handleZeroAmount(distributions) |
| 854 | |
| 855 | assert.Len(t, result, 3) |
| 856 | assert.Equal(t, big.NewInt(0), result["id1"]) |
| 857 | assert.Equal(t, big.NewInt(0), result["id2"]) |
| 858 | assert.Equal(t, big.NewInt(0), result["id3"]) |
| 859 | }) |
| 860 | |
| 861 | t.Run("Single distribution", func(t *testing.T) { |
| 862 | distributions := []Distribution{ |
| 863 | {Identifier: "single"}, |
| 864 | } |
| 865 | result := handleZeroAmount(distributions) |
| 866 | |
| 867 | assert.Len(t, result, 1) |
| 868 | assert.Equal(t, big.NewInt(0), result["single"]) |
| 869 | }) |
| 870 | |
| 871 | t.Run("Empty distributions", func(t *testing.T) { |
| 872 | distributions := []Distribution{} |
| 873 | result := handleZeroAmount(distributions) |
| 874 | |
| 875 | assert.Len(t, result, 0) |
| 876 | }) |
| 877 | } |
| 878 | |
| 879 | func TestCheckCondition_Extended(t *testing.T) { |
| 880 | balance := &Balance{ |
nothing calls this directly
no test coverage detected