public async Task TestMethod_QueryByEvent_Specific_Event_102()
        {
            ISignup signup = new SignMeUp();
            List <Task <QueryResult> > tasks = new List <Task <QueryResult> >();

            QueryInput queryInput1 = new QueryInput()
            {
                FunEvent = 102
            };
            QueryInput queryInput2 = new QueryInput()
            {
                FunEvent = 102
            };
            QueryInput queryInput3 = new QueryInput()
            {
                FunEvent = 102
            };

            queryInput1.CurrentPage = 0;
            var task1 = signup.Query(queryInput1);

            tasks.Add(task1);

            queryInput2.CurrentPage = 1;
            var task2 = signup.Query(queryInput2);

            tasks.Add(task2);

            queryInput3.CurrentPage = 2;
            var task3 = signup.Query(queryInput3);

            tasks.Add(task3);

            await Task.WhenAll(tasks);

            Assert.IsTrue(task1.Result.Records.Count == 20);
            Assert.IsTrue(task2.Result.Records.Count == 20);
            Assert.IsTrue(task3.Result.Records.Count == 11);

            TotallyDiff(task1.Result.Records, task2.Result.Records);
            TotallyDiff(task2.Result.Records, task3.Result.Records);
            TotallyDiff(task3.Result.Records, task1.Result.Records);

            AllQueryShouldBeInExpectedList(task1.Result.Records, ExpectedList);
            AllQueryShouldBeInExpectedList(task2.Result.Records, ExpectedList);
            AllQueryShouldBeInExpectedList(task3.Result.Records, ExpectedList);
        }
        public async Task TestMethod_Query_By_LastName_NoMatch()
        {
            ISignup    signup     = new SignMeUp();
            QueryInput queryInput = new QueryInput()
            {
                FunEvent = 0, LastName = "NO FOUND"
            };

            queryInput.CurrentPage = 0;

            var r = await signup.Query(queryInput);

            Assert.IsTrue(r.Records.Count == 0);
        }
        public async Task TestMethod_Query_By_FirstName_And_Event_102()
        {
            ISignup    signup     = new SignMeUp();
            QueryInput queryInput = new QueryInput()
            {
                FunEvent = 102, FirstName = ExpectedList[10].FirstName
            };

            queryInput.CurrentPage = 0;

            var r = await signup.Query(queryInput);

            Assert.IsTrue(r.Records.Count == 1);

            // Same person
            Assert.IsTrue(r.Records[0].Email == ExpectedList[10].Email);

            // Diff Events
            Assert.IsTrue(r.Records[0].FunEventId == 102);
        }
        public async Task TestMethod_Query_By_LastName_FirstName()
        {
            ISignup    signup     = new SignMeUp();
            QueryInput queryInput = new QueryInput()
            {
                FunEvent = 0, LastName = ExpectedList[51].LastName, FirstName = LastName = ExpectedList[51].FirstName
            };

            queryInput.CurrentPage = 0;

            var r = await signup.Query(queryInput);

            Assert.IsTrue(r.Records.Count == 3);

            // Same person
            Assert.IsTrue(r.Records[0].Email == ExpectedList[51].Email);
            Assert.IsTrue(r.Records[1].Email == ExpectedList[51].Email);
            Assert.IsTrue(r.Records[2].Email == ExpectedList[51].Email);

            // Diff Events
            Assert.IsTrue(r.Records[0].FunEventId != r.Records[1].FunEventId);
            Assert.IsTrue(r.Records[1].FunEventId != r.Records[2].FunEventId);
            Assert.IsTrue(r.Records[2].FunEventId != r.Records[0].FunEventId);
        }
        // [TestMethod]
        public async Task TestMethod_Query_ALL()
        {
            ISignup signup = new SignMeUp();
            List <Task <QueryResult> > tasks = new List <Task <QueryResult> >();

            QueryInput queryInput1 = new QueryInput()
            {
                FunEvent = 0
            };
            QueryInput queryInput2 = new QueryInput()
            {
                FunEvent = 0
            };
            QueryInput queryInput3 = new QueryInput()
            {
                FunEvent = 0
            };
            QueryInput queryInput4 = new QueryInput()
            {
                FunEvent = 0
            };
            QueryInput queryInput5 = new QueryInput()
            {
                FunEvent = 0
            };
            QueryInput queryInput6 = new QueryInput()
            {
                FunEvent = 0
            };
            QueryInput queryInput7 = new QueryInput()
            {
                FunEvent = 0
            };
            QueryInput queryInput8 = new QueryInput()
            {
                FunEvent = 0
            };
            QueryInput queryInput9 = new QueryInput()
            {
                FunEvent = 0
            };

            queryInput1.CurrentPage = 0;
            var task1 = signup.Query(queryInput1);

            tasks.Add(task1);

            queryInput2.CurrentPage = 1;
            var task2 = signup.Query(queryInput2);

            tasks.Add(task2);

            queryInput3.CurrentPage = 2;
            var task3 = signup.Query(queryInput3);

            tasks.Add(task3);

            queryInput4.CurrentPage = 3;
            var task4 = signup.Query(queryInput4);

            tasks.Add(task4);

            queryInput5.CurrentPage = 4;
            var task5 = signup.Query(queryInput5);

            tasks.Add(task5);

            queryInput6.CurrentPage = 5;
            var task6 = signup.Query(queryInput6);

            tasks.Add(task6);

            queryInput7.CurrentPage = 6;
            var task7 = signup.Query(queryInput7);

            tasks.Add(task7);

            queryInput8.CurrentPage = 7;
            var task8 = signup.Query(queryInput8);

            tasks.Add(task8);

            queryInput9.CurrentPage = 8;
            var task9 = signup.Query(queryInput9);

            tasks.Add(task9);

            await Task.WhenAll(tasks);

            Assert.IsTrue(task1.Result.Records.Count == 20);
            Assert.IsTrue(task2.Result.Records.Count == 20);
            Assert.IsTrue(task3.Result.Records.Count == 20);
            Assert.IsTrue(task4.Result.Records.Count == 20);
            Assert.IsTrue(task5.Result.Records.Count == 20);
            Assert.IsTrue(task6.Result.Records.Count == 20);
            Assert.IsTrue(task7.Result.Records.Count == 20);
            Assert.IsTrue(task8.Result.Records.Count < 20);
            Assert.IsTrue(task9.Result.Records.Count == 0);

            TotallyDiff(task1.Result.Records, task3.Result.Records);
            TotallyDiff(task1.Result.Records, task4.Result.Records);
            TotallyDiff(task1.Result.Records, task5.Result.Records);
            TotallyDiff(task1.Result.Records, task6.Result.Records);
            TotallyDiff(task1.Result.Records, task7.Result.Records);
            TotallyDiff(task1.Result.Records, task8.Result.Records);

            TotallyDiff(task2.Result.Records, task4.Result.Records);
            TotallyDiff(task2.Result.Records, task5.Result.Records);
            TotallyDiff(task2.Result.Records, task6.Result.Records);
            TotallyDiff(task2.Result.Records, task7.Result.Records);
            TotallyDiff(task2.Result.Records, task8.Result.Records);

            TotallyDiff(task3.Result.Records, task5.Result.Records);
            TotallyDiff(task3.Result.Records, task6.Result.Records);
            TotallyDiff(task3.Result.Records, task7.Result.Records);
            TotallyDiff(task3.Result.Records, task8.Result.Records);

            TotallyDiff(task4.Result.Records, task6.Result.Records);
            TotallyDiff(task4.Result.Records, task7.Result.Records);
            TotallyDiff(task4.Result.Records, task8.Result.Records);

            TotallyDiff(task5.Result.Records, task7.Result.Records);
            TotallyDiff(task5.Result.Records, task8.Result.Records);

            TotallyDiff(task6.Result.Records, task8.Result.Records);

            TotallyDiff(task7.Result.Records, task1.Result.Records);

            TotallyDiff(task8.Result.Records, task2.Result.Records);

            AllQueryShouldBeInExpectedList(task1.Result.Records, ExpectedList);
            AllQueryShouldBeInExpectedList(task2.Result.Records, ExpectedList);
            AllQueryShouldBeInExpectedList(task3.Result.Records, ExpectedList);
            AllQueryShouldBeInExpectedList(task4.Result.Records, ExpectedList);
            AllQueryShouldBeInExpectedList(task5.Result.Records, ExpectedList);
            AllQueryShouldBeInExpectedList(task6.Result.Records, ExpectedList);
            AllQueryShouldBeInExpectedList(task7.Result.Records, ExpectedList);
            AllQueryShouldBeInExpectedList(task8.Result.Records, ExpectedList);
        }