示例#1
0
        public void GetAddress_ShouldReturnFiveResult()
        {
            DistanceCalculatorController controller = new DistanceCalculatorController();
            List <Address> result = controller.Get(Constants.ADDRESSINPUT);

            Assert.AreEqual(result.Count, 5);
        }
示例#2
0
        public void GetAddress_ShouldReturnResult()
        {
            DistanceCalculatorController controller = new DistanceCalculatorController();
            List <Address> result = controller.Get(Constants.ADDRESSINPUT);

            Assert.IsNotNull(result);
        }
示例#3
0
        public void GetAddress_ShouldReturnNearestResult()
        {
            DistanceCalculatorController controller = new DistanceCalculatorController();
            List <Address> result         = controller.Get(Constants.ADDRESSINPUT);
            var            expectedResult = result.OrderBy(x => x.KM);

            Assert.IsTrue(expectedResult.SequenceEqual(result));
        }