public void GetSourcesReturnOneElementArrayForSingleSource() { var metadata = new ConverterMetadata { InternalSources = typeof(int), }; Type[] sources = metadata.GetSources(); Assert.That(sources.Length, Is.EqualTo(1)); Assert.That(sources[0], Is.EqualTo(typeof(int))); }
public void GetSourcesReturnTwoElementsArrayForListOfSources() { var metadata = new ConverterMetadata { InternalSources = new Type[] { typeof(int), typeof(string) }, }; Type[] sources = metadata.GetSources(); Assert.That(sources.Length, Is.EqualTo(2)); Assert.That(sources[0], Is.EqualTo(typeof(int))); Assert.That(sources[1], Is.EqualTo(typeof(string))); }
public void GetSourcesReturnEmptyArrayForDefaultValue() { var metadata = new ConverterMetadata(); Assert.That(metadata.GetSources(), Is.Empty); }