public void ToString_SourceIsPresentAndValueToStringIsNull_ExpectEmptyString() { var sourceValue = new StubType(null); var source = Optional <StubType> .Present(sourceValue); var actual = source.ToString(); Assert.IsEmpty(actual); }
public void ToString_SourceIsPresentAndValueToStringIsNotNull_ExpectSourceValueToStringResult( string sourceValueToStringResult) { var sourceValue = new StubType(sourceValueToStringResult); var source = Optional <StubType> .Present(sourceValue); var actual = source.ToString(); Assert.AreEqual(sourceValueToStringResult, actual); }