public void GetEnumDescription_WithIncorrectData_ShouldReturnCorrectResult() { var errorMessagePrefix = "EnumParseService GetEnumDescription() method does not work properly."; // Arrange var stringFormatServiceMock = this.GetStringFormatServiceMock(); var enumParseService = new EnumParseService(stringFormatServiceMock.Object); // Act string actualResult = enumParseService .GetEnumDescription("Incorrect", typeof(Period)); string expectedResult = null; // Assert Assert.True(expectedResult == actualResult, errorMessagePrefix + " " + "Result is not null."); }
public void GetEnumDescription_WithCorrectData_ShouldReturnCorrectResult() { var errorMessagePrefix = "EnumParseService GetEnumDescription() method does not work properly."; // Arrange var stringFormatServiceMock = this.GetStringFormatServiceMock(); var enumParseService = new EnumParseService(stringFormatServiceMock.Object); // Act var actualResult = enumParseService .GetEnumDescription(Period.ALaMinute.ToString(), typeof(Period)); var expectedResult = "A La Minute"; // Assert Assert.True(expectedResult == actualResult, errorMessagePrefix + " " + "Description is not returned properly."); }