Exemplo n.º 1
0
        public void GivenGreaterThan1_PersonFromPeopleList_ShouldReturnExpectationValueParameterK(int numberFirstPeople, int expectationResult)
        {
            var pid         = new Expression <Func <Person, object> >[] { p => p.FirstName, p => p.Surname, p => p.Age, p => p.Gender, p => p.Job, p => p.City };
            var recognition = new RecognitionParameterK(_people.GetRange(0, numberFirstPeople));
            var result      = recognition.CalculateParameterK(pid);

            Assert.IsTrue(result == expectationResult);
        }
Exemplo n.º 2
0
        public void GivenEmptyPeopleList_ShouldReturn_0()
        {
            var pid         = new Expression <Func <Person, object> >[] { p => p.FirstName, p => p.Surname, p => p.Age };
            var recognition = new RecognitionParameterK(new List <Person>());
            var result      = recognition.CalculateParameterK(pid);

            Assert.IsTrue(result == 0);
        }