public void SubSitesTest()
 {
     TeletextStructureSite target = new TeletextStructureSite(); // TODO: Initialize to an appropriate value
     List<int> expected = null; // TODO: Initialize to an appropriate value
     List<int> actual;
     target.SubSites = expected;
     actual = target.SubSites;
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
 public void SiteNumberTest()
 {
     TeletextStructureSite target = new TeletextStructureSite(); // TODO: Initialize to an appropriate value
     int expected = 0; // TODO: Initialize to an appropriate value
     int actual;
     target.SiteNumber = expected;
     actual = target.SiteNumber;
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Пример #3
0
        public DataContract.TeletextStructureSite GetTeletextStructure(int SiteNumber)
        {
            TeletextStructureSite siteInfo = new TeletextStructureSite();
              siteInfo.SiteNumber = SiteNumber;

              // check if Subsites exists ?

            for (int indexSite = 0; indexSite < 10; indexSite++)
                  {
              string Url = string.Format(ConfigurationManager.AppSettings["BaseUrl"], SiteNumber, string.Format("{0:00}", indexSite));

              if (Helper.CheckIfURLExists(new Uri(Url)))
              {
                      siteInfo.SubSites.Add(indexSite);
              }
              }

              return siteInfo;
        }
 public void TeletextStructureSiteConstructorTest()
 {
     TeletextStructureSite target = new TeletextStructureSite();
     Assert.Inconclusive("TODO: Implement code to verify target");
 }
Пример #5
0
        /// <summary>
        /// Gets the teletext structure.
        /// </summary>
        /// <param name="SiteNumber">The site number.</param>
        /// <returns></returns>
        public DataContract.TeletextStructureSite GetTeletextStructure(int SiteNumber)
        {
            try
              {
            TeletextStructureSite siteInfo = new TeletextStructureSite(SiteNumber);

            // check if Subsites exists
            for (int indexSite = 0; indexSite < 10; indexSite++)
            {
              string Url = UrlFormatter.FormatTeletextUrl(SiteNumber, indexSite);
              if (Helper.CheckIfURLExists(new Uri(Url)))
              {
                siteInfo.SubSites.Add(indexSite);
              }
            }

            return siteInfo;
              }
              catch (Exception ex)
              {
            FaultContract fault = new FaultContract();
            throw new FaultException<FaultContract>(fault, new FaultReason(ex.Message));
              }
        }
Пример #6
0
 public void GetTeletextStructureTest()
 {
     Service target = new Service();
     int SiteNumber = 100;
     TeletextStructureSite expected = new TeletextStructureSite(100);
     TeletextStructureSite actual;
     actual = target.GetTeletextStructure(SiteNumber);
     Assert.AreEqual(expected.SiteNumber, actual.SiteNumber);
 }
        public void TeletextStructureSiteConstructorTest()
        {
            int siteNumber = 241;
            TeletextStructureSite target = new TeletextStructureSite(siteNumber);

            Assert.AreEqual(target.SiteNumber, 241);
        }