public void AreNotEqual() { ISectionID expected = SectionID.FromString("1234B012"); ISectionID actual = SectionID.FromString("4321A121"); Assert.AreNotEqual(expected, actual); }
public void AreEqual_String() { string sectionIdString = "1234B012"; ISectionID actual = SectionID.FromString(sectionIdString); Assert.AreEqual(actual, sectionIdString); }
public void SectionIdToString_Success() { string expected = "1234B012"; ISectionID actual = SectionID.FromString(expected); Assert.AreEqual(expected, actual.ToString()); }
public void AreEqual() { string sectionIdString = "1234B012"; ISectionID expected = SectionID.FromString(sectionIdString); ISectionID actual = SectionID.FromString(sectionIdString); Assert.AreEqual(expected, actual); }
public void FromString_Success_ItemNumberWithLeadingZeroes() { string itemNumber = "0002"; string yrq = "B012"; ISectionID id = SectionID.FromString(String.Concat(itemNumber, yrq)); Assert.AreEqual(id.ItemNumber, itemNumber); Assert.AreEqual(id.YearQuarter, yrq); }
[Ignore] // this cast doesn't seem to work. Would like to make it work somehow. [email protected] 3/14/2013 public void SubClassed_SafeCast() { string sectionId = "4321A121"; ISectionID actual = SectionID.FromString(sectionId); SubclassedSectionID subclassed = actual as SubclassedSectionID; Assert.IsNotNull(subclassed); }
public void ID_ToString() { string sectionId = "4321A121"; ISectionID actual = SectionID.FromString(sectionId); string actualString = actual.ToString(); Assert.AreEqual(sectionId, actualString); }
public void SubClassed_NewFromISectionID() { string sectionId = "4321A121"; ISectionID actual = SectionID.FromString(sectionId); SubclassedSectionID subclassed = new SubclassedSectionID(actual); Assert.IsNotNull(subclassed); Assert.AreEqual(sectionId, subclassed.ToString()); }
/// <summary> /// /// </summary> /// <param name="sectionId"></param> public Section(ISectionID sectionId) : this() { ID = sectionId; }
/// <summary> /// /// </summary> /// <param name="sectionId"></param> public Section(ISectionID sectionId) : this() { ID = sectionId; }
public SubclassedSectionID(ISectionID sectionID) : base(sectionID.ItemNumber, sectionID.YearQuarter) { }
public void AreNotEqual_String() { ISectionID actual = SectionID.FromString("4321A121"); Assert.AreNotEqual("1234B012", actual); }
/// <summary> /// /// </summary> /// <param name="other"></param> /// <returns></returns> public bool Equals(ISectionID other) { return(Equals(other as SectionID)); }
public SubclassedSectionID(ISectionID sectionID) : base(sectionID.ItemNumber, sectionID.YearQuarter) { }
/// <summary> /// Creates a new <see cref="T:Ctc.Ods.Types.SectionID"/> from an item # and YRQ /// </summary> public ClassScheduleSectionID(ISectionID sectionID) : base(sectionID.ItemNumber, sectionID.YearQuarter) { }