Beispiel #1
0
        public void NumbersFromFiveToFiveTest()
        {
            var result = Linq.NumbersFromFiveToFive(numbers);

            CollectionAssert.AreEquivalent(new List <int> {
                0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95
            }, result);
        }
Beispiel #2
0
        public void GetNumbersOfNamesTest()
        {
            var result = Linq.GetNumbersOfNames(values);

            CollectionAssert.AreEquivalent(new List <string> {
                "1", "2", "1", "2", "14", "424", "1215", "325"
            }, result);
        }
Beispiel #3
0
        public void AllNamesTest()
        {
            var result = Linq.AllNames(values);

            CollectionAssert.AreEquivalent(new List <string>()
            {
                "Names1", "Names2", "Names1", "Names2", "Names14", "Nam4es24", "Na12mes15", "Na3mes25"
            }, result);
        }
Beispiel #4
0
        public void SliceTest()
        {
            var result = Linq.Slice(values, 1, 2);

            CollectionAssert.AreEquivalent(new List <Dummy>()
            {
                values[1], values[2]
            }, result);
        }
Beispiel #5
0
        public void FilterByMinIdTest()
        {
            var result = Linq.FilterByMinId(values, 14);

            CollectionAssert.AreEquivalent(new List <string>()
            {
                "Name4", "Name5"
            }, result);
        }
Beispiel #6
0
        public void CountPetsTest()
        {
            var result = Linq.CountPets(pets);

            CollectionAssert.AreEquivalent(new List <string>
            {
                "cat:8", "chinchilla:6", "dog:13", "fish:7", "hamster:4", "leopard:1", "rabbit:6"
            }, result);
        }
Beispiel #7
0
        public void GetNamesTest()
        {
            var result = Linq.GetNames(values);

            Assert.IsTrue(values.Count == result.Count);
        }
Beispiel #8
0
        public void ExpandLettersTest()
        {
            var result = Linq.ExpandLetters(expand);

            Assert.AreEqual("AAAAABBBBBBBBBBCDD", result);
        }
Beispiel #9
0
        public void TotalScoreTest()
        {
            var result = Linq.TotalScore(score);

            Assert.AreEqual(48, result);
        }