Statistics
| Branch: | Revision:

root / trunk / Pithos.Core.Test / EnumerableExtensionsTest.cs @ 7b0a5fec

History | View | Annotate | Download (808 Bytes)

1
´╗┐using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using NUnit.Framework;
6

    
7
namespace Pithos.Core.Test
8
{
9
    [TestFixture]
10
    public class EnumerableExtensionsTest
11
    {
12
        [Test]
13
        public void TestSplice()
14
        {
15
            string[] twoElems= {"one","two"};
16
            var result=twoElems.Splice(1);
17
            Assert.AreEqual(1,result.Count());
18
            
19
            result=twoElems.Splice(0);
20
            Assert.AreEqual(2,result.Count());
21
        }
22

    
23
        [Test]
24
        public void TestSpliceEmpty()
25
        {
26
            string[] empty= {};
27
            var result=empty.Splice(1);
28
            Assert.AreEqual(0,result.Count());
29
            
30
            result=empty.Splice(0);
31
            Assert.AreEqual(0,result.Count());
32
        }
33
    }
34
}