already exist key
continuous-integration/drone/push Build is passing Details

test_dice_group_manager
mohammad_zafir.jeeawody 3 years ago
parent c6e5991e99
commit c94d3357f5

@ -97,5 +97,23 @@ namespace Tests.Data_UTs.Dice
}
[Fact]
public void TestAddIfAlreadyExistsThrowsException()
{
DiceGroupManager dgm = new();
// Act
KeyValuePair<string, IEnumerable<Die>> toAdd = new("Monopoly", new List<NumberDie> { new NumberDie(new NumberFace(5), new NumberFace(7)), new NumberDie(new NumberFace(5), new NumberFace(7))});
dgm.Add(toAdd);
void action() => dgm.Add(toAdd);
// Assert
Xunit.Assert.Throws<ArgumentException>(action);
}
}
}

Loading…
Cancel
Save