コード例 #1
0
        public void ToSelectList_ShouldSetTextAndValue()
        {
            var collection = new[] {"foo", "bar"};
            var result = collection.ToSelectList();

            Assert.That(result.First().Text, Is.EqualTo("foo"));
            Assert.That(result.First().Value, Is.EqualTo("foo"));
            Assert.That(result.Last().Text, Is.EqualTo("bar"));
            Assert.That(result.Last().Value, Is.EqualTo("bar"));
        }