Example #1
0
        public void Clone_should_return_other_instance()
        {
            var source = new List <object>();
            var clone  = InternalExtensions.Clone(source);

            Assert.NotSame(source, clone);
        }
Example #2
0
        public void Clone_should_throw_ArgumentNullException_when_source_is_null()
        {
            List <string> nullTarget = null;
            Action        act        = () => InternalExtensions.Clone(nullTarget);

            act.ShouldThrow <ArgumentNullException>().And.ParamName.Should().Be("source");
        }
Example #3
0
        public void Clone_should_return_list_with_same_values()
        {
            var source = new List <int> {
                1, 2, 3, 4, 5
            };
            var clone = InternalExtensions.Clone(source);

            clone.Should().ContainInOrder(source);
        }