Exemple #1
0
        public void GetTechnicianById()
        {
            Franchise franchise = new Franchise(_ctx.Listen360, TestUtil.GetElementForXml(Properties.Resources.FakeFranchise1));

            TestUtil.SetupResponseXml(_ctx.WebRequest, Properties.Resources.FakeTechnician1);
            ITechnician tech = franchise.GetTechnicianById(3);

            Assert.IsTrue(_ctx.WebRequestFactory.CreateWebRequestCalled);
            Assert.AreEqual(string.Format("{0}/{1}/technicians/3", _ctx.Url, franchise.Path), _ctx.WebRequestFactory.CreateWebRequestLastUrl);
            Assert.NotNull(tech);
        }