public void ShouldGenerateValue() { var gen = new CurrentDateTimeGenerator(new ColumnDataTypeDefinition("DateTime2(2)", false)); var firstValue = gen.GenerateValue(1); Assert.That(firstValue, Is.Not.Null); }
public void ShouldOffsetNegativeValueUsingParameters() { var gen = new CurrentDateTimeGenerator(new ColumnDataTypeDefinition("DateTime2(2)", false)); gen.GeneratorParameters.ShiftDays.Value = -1; gen.GeneratorParameters.ShiftHours.Value = -1; gen.GeneratorParameters.ShiftMinutes.Value = -10; gen.GeneratorParameters.ShiftSeconds.Value = -10; gen.GeneratorParameters.ShiftMilliseconds.Value = -20; var firstValue = (DateTime)gen.GenerateValue(1); Assert.That(firstValue, Is.LessThan(DateTime.Now)); }