public virtual void TestGtsEquals() { PeriodicIntervalTime pivl1 = PeriodicIntervalTime.CreatePeriodPhase(new DateDiff(new PhysicalQuantity(new BigDecimal(4), Ca.Infoway.Messagebuilder.Domainvalue.Basic.UnitsOfMeasureCaseSensitive.DAY)), IntervalFactory.CreateLowHigh(new PlatformDate (1234), new PlatformDate(5678))); GeneralTimingSpecification gts1 = new GeneralTimingSpecification(IntervalFactory.CreateLowHigh(new PlatformDate(2222), new PlatformDate(3333)), pivl1); PeriodicIntervalTime pivl2 = PeriodicIntervalTime.CreatePeriodPhase(new DateDiff(new PhysicalQuantity(new BigDecimal(4), Ca.Infoway.Messagebuilder.Domainvalue.Basic.UnitsOfMeasureCaseSensitive.DAY)), IntervalFactory.CreateLowHigh(new PlatformDate (1234), new PlatformDate(5678))); GeneralTimingSpecification gts2 = new GeneralTimingSpecification(IntervalFactory.CreateLowHigh(new PlatformDate(2222), new PlatformDate(3333)), pivl2); Assert.AreEqual(gts1, gts2); }
public virtual void TestNullParameters() { IntervalFactory.CreateCentre((PlatformDate)null); IntervalFactory.CreateCentre((PlatformDate)null, (NullFlavor)null); IntervalFactory.CreateCentreHigh((PlatformDate)null, (PlatformDate)null); IntervalFactory.CreateCentreHigh((PlatformDate)null, (PlatformDate)null, (NullFlavor)null, (NullFlavor)null); IntervalFactory.CreateCentreWidth((PlatformDate)null, (Diff <PlatformDate>)null); IntervalFactory.CreateCentreWidth((PlatformDate)null, (Diff <PlatformDate>)null, (NullFlavor)null); IntervalFactory.CreateHigh((PlatformDate)null); IntervalFactory.CreateHigh((PlatformDate)null, (NullFlavor)null); IntervalFactory.CreateLow((PlatformDate)null); IntervalFactory.CreateLow((PlatformDate)null, (NullFlavor)null); IntervalFactory.CreateLowCentre((PlatformDate)null, (PlatformDate)null); IntervalFactory.CreateLowCentre((PlatformDate)null, (PlatformDate)null, (NullFlavor)null, (NullFlavor)null); IntervalFactory.CreateLowHigh((PlatformDate)null, (PlatformDate)null); IntervalFactory.CreateLowHigh((PlatformDate)null, (PlatformDate)null, (NullFlavor)null, (NullFlavor)null); IntervalFactory.CreateLowWidth((PlatformDate)null, (Diff <PlatformDate>)null); IntervalFactory.CreateLowWidth((PlatformDate)null, (Diff <PlatformDate>)null, (NullFlavor)null); IntervalFactory.CreateSimple((PlatformDate)null); IntervalFactory.CreateWidth((Diff <PlatformDate>)null); IntervalFactory.CreateWidthHigh((Diff <PlatformDate>)null, (PlatformDate)null); IntervalFactory.CreateWidthHigh((Diff <PlatformDate>)null, (PlatformDate)null, (NullFlavor)null); }
public virtual void TestPivlEquals() { PeriodicIntervalTime pivl1 = PeriodicIntervalTime.CreatePeriodPhase(new DateDiff(new PhysicalQuantity(new BigDecimal(4), Ca.Infoway.Messagebuilder.Domainvalue.Basic.UnitsOfMeasureCaseSensitive.DAY)), IntervalFactory.CreateLowHigh(new PlatformDate (1234), new PlatformDate(5678))); PeriodicIntervalTime pivl2 = PeriodicIntervalTime.CreatePeriodPhase(new DateDiff(new PhysicalQuantity(new BigDecimal(4), Ca.Infoway.Messagebuilder.Domainvalue.Basic.UnitsOfMeasureCaseSensitive.DAY)), IntervalFactory.CreateLowHigh(new PlatformDate (1234), new PlatformDate(5678))); Assert.AreEqual(pivl1, pivl2); pivl1 = PeriodicIntervalTime.CreateFrequency(5, new PhysicalQuantity(new BigDecimal(4), Ca.Infoway.Messagebuilder.Domainvalue.Basic.UnitsOfMeasureCaseSensitive .DAY)); pivl2 = PeriodicIntervalTime.CreateFrequency(5, new PhysicalQuantity(new BigDecimal(4), Ca.Infoway.Messagebuilder.Domainvalue.Basic.UnitsOfMeasureCaseSensitive .DAY)); Assert.AreEqual(pivl1, pivl2); }
/// <summary>Constructs an Interval using the supplied parameters.</summary> /// <remarks>Constructs an Interval using the supplied parameters.</remarks> /// <TBD></TBD> /// <param name="low">the low bound</param> /// <param name="width">the width as a Diff object</param> /// <returns>the constructed interval</returns> public static Interval <T> CreateLowWidth <T>(T low, Diff <T> width) { return(IntervalFactory.CreateLowWidth(low, width, null)); }
/// <summary>Constructs an Interval using the supplied parameters.</summary> /// <remarks>Constructs an Interval using the supplied parameters.</remarks> /// <TBD></TBD> /// <param name="width">the width as a Diff object</param> /// <param name="high">the high bound</param> /// <returns>the constructed interval</returns> public static Interval <T> CreateWidthHigh <T>(Diff <T> width, T high) { return(IntervalFactory.CreateWidthHigh(width, high, null)); }
/// <summary>Constructs an Interval using the supplied parameters.</summary> /// <remarks>Constructs an Interval using the supplied parameters.</remarks> /// <TBD></TBD> /// <param name="centre">the centre bound</param> /// <returns>the constructed interval</returns> public static Interval <T> CreateCentre <T>(T centre) { return(IntervalFactory.CreateCentre(centre, null)); }
/// <summary>Constructs an Interval using the supplied parameters.</summary> /// <remarks>Constructs an Interval using the supplied parameters.</remarks> /// <TBD></TBD> /// <param name="low">the low bound</param> /// <param name="high">the high bound</param> /// <returns>the constructed interval</returns> public static Interval <T> CreateLowHigh <T>(T low, T high) { return(IntervalFactory.CreateLowHigh(low, high, null, null)); }
/// <summary>Constructs an Interval using the supplied parameters.</summary> /// <remarks>Constructs an Interval using the supplied parameters.</remarks> /// <TBD></TBD> /// <param name="high">the high bound</param> /// <returns>the constructed interval</returns> public static Interval <T> CreateHigh <T>(T high) { return(IntervalFactory.CreateHigh(high, null)); }
/// <summary>Constructs an Interval using the supplied parameters.</summary> /// <remarks>Constructs an Interval using the supplied parameters.</remarks> /// <TBD></TBD> /// <param name="low">the low bound</param> /// <returns>the constructed interval</returns> public static Interval <T> CreateLow <T>(T low) { return(IntervalFactory.CreateLow(low, null)); }
/// <summary>Constructs an Interval using the supplied parameters.</summary> /// <remarks>Constructs an Interval using the supplied parameters.</remarks> /// <param name="centre"></param> /// <param name="high"></param> /// <returns>the constructed interval</returns> public static Interval <T> CreateCentreHigh <T>(T centre, T high) { return(IntervalFactory.CreateCentreHigh(centre, high, null, null)); }
/// <summary>Constructs an Interval using the supplied parameters.</summary> /// <remarks>Constructs an Interval using the supplied parameters.</remarks> /// <param name="low"></param> /// <param name="centre"></param> /// <returns>the constructed interval</returns> public static Interval <T> CreateLowCentre <T>(T low, T centre) { return(IntervalFactory.CreateLowCentre(low, centre, null, null)); }
/// <summary>Constructs an Interval using the supplied parameters.</summary> /// <remarks>Constructs an Interval using the supplied parameters.</remarks> /// <TBD></TBD> /// <param name="centre">the centre bound</param> /// <param name="width">the width as a Diff object</param> /// <returns>the constructed interval</returns> public static Interval <T> CreateCentreWidth <T>(T centre, Diff <T> width) { return(IntervalFactory.CreateCentreWidth(centre, width, null)); }