コード例 #1
0
        public void GetDestinationsReturnOneElementArrayForSingleSource()
        {
            var metadata = new ConverterMetadata {
                InternalDestinations = typeof(int),
            };

            Type[] dests = metadata.GetDestinations();
            Assert.That(dests.Length, Is.EqualTo(1));
            Assert.That(dests[0], Is.EqualTo(typeof(int)));
        }
コード例 #2
0
        public void GetDestinationsReturnTwoElementsArrayForListOfSources()
        {
            var metadata = new ConverterMetadata {
                InternalDestinations = new Type[] { typeof(int), typeof(string) },
            };

            Type[] dests = metadata.GetDestinations();
            Assert.That(dests.Length, Is.EqualTo(2));
            Assert.That(dests[0], Is.EqualTo(typeof(int)));
            Assert.That(dests[1], Is.EqualTo(typeof(string)));
        }
コード例 #3
0
        public void GetDestinationsReturnEmptyArrayForDefaultValue()
        {
            var metadata = new ConverterMetadata();

            Assert.That(metadata.GetDestinations(), Is.Empty);
        }