public void ToString_SourceIsSecondAndValueToStringReturnsNull_ExpectEmptyString() { var sourceValue = new StubToStringType(null); var source = TaggedUnion <string, StubToStringType> .Second(sourceValue); var actual = source.ToString(); Assert.IsEmpty(actual); }
public void ToString_SourceIsFirstAndValueToStringReturnsNull_ExpectEmptyString() { var sourceValue = new StubToStringType(null); var source = TaggedUnion <StubToStringType, RefType> .First(sourceValue); var actual = source.ToString(); Assert.IsEmpty(actual); }
public void ToString_SourceIsSecondAndValueToStringDoesNotReturnNull_ExpectResultOfValueToString( string resultOfValueToString) { var sourceValue = new StubToStringType(resultOfValueToString); var source = TaggedUnion <StructType, StubToStringType> .Second(sourceValue); var actual = source.ToString(); Assert.AreEqual(resultOfValueToString, actual); }