|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QgOne.Core;
namespace DateTimeTests
{
[TestClass]
public static class DateTimeTests
{
[TestMethod]
public static void AddTimeSpan(MDateTime dt, MTimeSpan ts, MValidate val)
{
dt.Resolve();
ts.Resolve(dt, val);
try
{
DateTime actual = dt.Value.Add(ts.Value);
val.ValidateAdd(dt, ts, actual);
}
catch (ArgumentOutOfRangeException)
{
Assert.IsTrue(val.Overflow_year, "Unexpected out of range exception");
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I started programming as a kid and went through basic, C and assembler. I got a MSc.CS from University of Aarhus in 1998 and have maintained an interest for computer science ever since, that I enjoy applying to the problems I come across. I have worked in different roles as a programmer, architect, project manager and consulting in many different areas including databases, cryptography, server architecture and distributed systems. I am currently focussing on the testing done during development and seek to improve this through a combination of approach, skill and technology.