Exemple #1
0
        public void GetGender_3Records()
        {
            _recordsController.Post("Doe|John|Male|Blue|1995-01-01");
            _recordsController.Post("Sanders|Jane|Female|Blue|1994-02-02");
            _recordsController.Post("Smith|Jane|Female|Brown|2002-02-13");

            var records = _recordsController.GetGender() as IEnumerable <RecordViewModel>;

            Assert.IsNotNull(records);
            Assert.AreEqual(records.Count(), 3);

            var list = records.ToList();

            Assert.AreEqual(list[0].LastName, "Sanders");
            Assert.AreEqual(list[1].LastName, "Smith");
            Assert.AreEqual(list[2].LastName, "Doe");
        }