public void Sort_ValidString_ReturnsSortedStringDescending() { //arrange var input = GetValidStringInput(); //act IStringService stringService = new StringService(); var result = stringService.ProcessSort(input); //assert Assert.AreEqual("11,9,7,5,2", result.InputString); }
public void Sort_EmptyString_ReturnsInputStringRequired() { //arrange var input = GetValidStringInput(); input.InputString = ""; //act IStringService stringService = new StringService(); var result = stringService.ProcessSort(input); //assert Assert.AreEqual(StringError.InputStringRequired, result.Error); }
public void Sort_StringWithNonNumbers_ReturnsInputStringNotInteger() { //arrange var input = GetValidStringInput(); input.InputString = input.InputString + "sometext"; //act IStringService stringService = new StringService(); var result = stringService.ProcessSort(input); //assert Assert.AreEqual(StringError.InputStringNotInteger, result.Error); }