public void GetButton_IfButtonExist_DoesNotThrow() { // Arrange SimpleT9Keypad sut = new SimpleT9Keypad(); // Act Action act = () => sut.GetButton('e'); // Assert act.Should().NotThrow <ArgumentException>(); }
public void GetButton_ReturnsExpectedButton() { // Arrange SimpleT9Keypad sut = new SimpleT9Keypad(); // Act IT9Button button = sut.GetButton('e'); // Assert button.Label.Should().Be('3'); }
public void GetButton_IfButtonDoesNotExist_Throws() { // Arrange SimpleT9Keypad sut = new SimpleT9Keypad(); // Act Action act = () => sut.GetButton('*'); // Assert act.Should().Throw <ArgumentException>() .WithMessage("Button with given symbol '*' does not exist."); }