예제 #1
0
        public void AsNumbers_ContainingNonBNumberType_ThrowsInvalidCastException()
        {
            var blist = new BList {
                1, 2, "3"
            };
            Action action = () => blist.AsNumbers();

            action.ShouldThrow <InvalidCastException>();
        }
예제 #2
0
        public void AsNumbers_ConvertsToListOfLongs()
        {
            var blist = new BList {
                1, 2, 3
            };
            var numbers = blist.AsNumbers();

            numbers.Should().HaveCount(3);
            numbers.Should().ContainInOrder(1L, 2L, 3L);
        }