Inheritance: ISection
Example #1
0
        public void ISections_AreNotEqual()
        {
            ISection sec1 = new Section(SectionID.FromString("1234B012"));
            ISection sec2 = new Section(SectionID.FromString("4321B121"));

            Assert.AreNotEqual(sec1, sec2);
        }
Example #2
0
        public void ISectionSection_AreEqual()
        {
            ISection sec1 = new Section(SectionID.FromString("1234B012"));
            Section sec2 = new Section(SectionID.FromString("1234B012"));

            Assert.AreEqual(sec1, sec2);
        }
 /// <summary>
 /// Takes a Section and produces all automated messages that the section should display.
 /// </summary>
 /// <param name="section">The section to base the generated footnote messages on.</param>
 /// <returns>A string of all automated footnote messages concatenated.</returns>
 public static string getAutomatedFootnotesText(Section section)
 {
     string wSpace = section.Footnotes.Count() == 0 ? string.Empty : " ";
     string footenoteText = buildFootnoteText(section.IsDifferentStartDate,
                                                                                      section.IsDifferentEndDate,
                                                                                      section.IsHybrid,
                                                                                      section.IsTelecourse,
                                                                                      section.StartDate.GetValueOrDefault(DateTime.Now),
                                                                                      section.EndDate.GetValueOrDefault(DateTime.Now));
     return wSpace + footenoteText;
 }
Example #4
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="other"></param>
 /// <returns></returns>
 public bool Equals(Section other)
 {
     if (ReferenceEquals(null, other))
     {
         return false;
     }
     if (ReferenceEquals(this, other))
     {
         return true;
     }
     return Equals(other.ID, ID);
 }
Example #5
0
        public void ISectionToString_Success()
        {
            string sectionIdString = "1234B012";
            ISection section = new Section(SectionID.FromString(sectionIdString));

            Assert.AreEqual(sectionIdString, section.ToString());
        }
Example #6
0
 public void ISectionInstantiation_Success()
 {
     ISection section = new Section(SectionID.FromString("1234B012"));
 }