public void ReadXElement_Empty_ThrowsSyncDocumentException() { DailyFrecuencyNTimesPerDay frec = new DailyFrecuencyNTimesPerDay(); XElement element = XElement.Parse("<NotDailyFrecuencyNTimesPerDay />"); frec.ReadXElement(element); }
public void ReadXElement_SetOcurenceTypeValue_ReturnsCorrectOcurenceTypeValue() { var frec = new DailyFrecuencyNTimesPerDay(); frec.OcurenceTypeValue = DailyFrecuencyNTimesPerDay.OcurenceType.Second; var element = frec.GetXElement(); var newFrec = new DailyFrecuencyNTimesPerDay(); newFrec.ReadXElement(element); Assert.IsTrue(frec.OcurenceTypeValue == newFrec.OcurenceTypeValue); }
public void ReadXElement_SetOcureEveryN_ReturnsCorrectOcureEveryN() { var frec = new DailyFrecuencyNTimesPerDay(); frec.OcureEveryN = 10; var element = frec.GetXElement(); var newFrec = new DailyFrecuencyNTimesPerDay(); newFrec.ReadXElement(element); Assert.IsTrue(frec.OcureEveryN == newFrec.OcureEveryN); }
public void ReadXElement_SetStartTimeOfDay_ReturnsCorrectStartTimeOfDay() { var frec = new DailyFrecuencyNTimesPerDay(); frec.StartTimeOfDay = new TimeSpan(12, 13, 14); var element = frec.GetXElement(); var newFrec = new DailyFrecuencyNTimesPerDay(); newFrec.ReadXElement(element); Assert.IsTrue(frec.StartTimeOfDay == newFrec.StartTimeOfDay); }
public void ReadXElement_Empty_ThrowsArgumentNullException() { DailyFrecuencyNTimesPerDay frec = new DailyFrecuencyNTimesPerDay(); XElement element = null; frec.ReadXElement(element); }