Esempio n. 1
0
        public void ToString_SourceIsSecondAndValueToStringReturnsNull_ExpectEmptyString()
        {
            var sourceValue = new StubToStringType(null);

            var source = TaggedUnion <string, StubToStringType> .Second(sourceValue);

            var actual = source.ToString();

            Assert.IsEmpty(actual);
        }
Esempio n. 2
0
        public void ToString_SourceIsFirstAndValueToStringReturnsNull_ExpectEmptyString()
        {
            var sourceValue = new StubToStringType(null);

            var source = TaggedUnion <StubToStringType, RefType> .First(sourceValue);

            var actual = source.ToString();

            Assert.IsEmpty(actual);
        }
Esempio n. 3
0
        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);
        }