package main
import (
"fmt"
"testing"
"github.com/stretchr/testify/assert"
)
func TestBankRobber(t *testing.T) {
cases := []struct {
Robbers int
Vaults int
vi []VaultInfo
Expected int
}{
{1, 1, []VaultInfo{{3, 1}}, 250},
{4, 4, []VaultInfo{{3, 2}, {4, 1}, {7, 6}, {7, 1}}, 5000000},
{2, 4, []VaultInfo{{3, 1}, {3, 2}, {4, 0}, {4, 0}}, 1125},
{5, 20, []VaultInfo{{6, 3}, {7, 1}, {4, 4}, {8, 4}, {3, 0}, {4, 3}, {8, 1}, {3, 3}, {5, 5}, {7, 6}, {6, 2}, {5, 3}, {5, 4}, {7, 0}, {7, 0}, {8, 4}, {6, 0}, {6, 5}, {3, 2}, {4, 2}}, 6515625},
}
for _, tc := range cases {
t.Run(fmt.Sprintf("Robbers:%d, Vaults:%d, VaultInfo:%v", tc.Robbers, tc.Vaults, tc.vi), func(t *testing.T) {
t.Parallel()
assert.Equal(t, tc.Expected, BankRobber(tc.Robbers, tc.Vaults, tc.vi))
})
}
}