public void ItShouldThrow(char letter) { //Arrange RomansConverter sut = new RomansConverter(); //Act //Assert Assert.Throws <ArgumentException>(() => sut.LookupChar(letter)); }
public void ItShouldConstruct() { //Arrange RomansConverter sut = new RomansConverter(); //Act //Assert Assert.NotNull(sut); }
public void ItShouldReturn0IfInvalidChar(char letter) { //Arrange RomansConverter sut = new RomansConverter(); //Act int result = sut.FromNumeral(letter.ToString()); //Assert Assert.True(result == 0); }
public void ItShouldLookup( char letter, int expectedValue) { //Arrange RomansConverter sut = new RomansConverter(); //Act int returnedValue = sut.LookupChar(letter); //Assert Assert.Equal(expectedValue, returnedValue); }
public void ItShouldConvert( string input, int expected) { //Arrange RomansConverter sut = new RomansConverter(); //Act int result = sut.FromNumeral(input); //Assert Assert.Equal(expected, result); }
public void ItShouldReturnEmptyStringIfInvalidInput( int digit, string expected) { //Arrange RomansConverter sut = new RomansConverter(); //Act string result = sut.ToNumeral(digit); //Assert expected.Should().BeEquivalentTo(result); }