资 源 简 介
DUnitLite is an attempt to improve upon the DUnit unit-testing framework for Delphi. It"s currently an add-on library for DUnit (though, as the name suggests, it may someday grow to be a full lightweight testing library in its own right).
Right now, DUnitLite offers three major features over the base DUnit library:
Readable assertions
Most xUnit test frameworks have backwards assertion methods. They make you put the expected value first, followed by the actual value:
CheckEquals(4, Add(2, 2));
How do you read that? "Check that 4 is what you get when you add 2 and 2"? You shouldn"t have to think this hard to understand what the test is doing. What if you could write it the way you would speak: "Check that 2 plus 2 is 4"?
Enter DUnitLite.
Specify.That(Add(2, 2), Should.Equal(4));Specify.That(Control.Caption, Should.Equal("Close").IgnoringCase);
文 件 列 表
CHANGELOG.txt
Constraints.pas
ConstraintTests.pas
dcu
DUnitAssertions.bdsproj
DUnitAssertions.dpr
DUnitAssertions.res
InsulatedTests.pas
Specifications.pas
Specifiers.pas
SpecifierTests.pas
StringInspectors.pas
StringInspectorSpecs.pas
TestValues.pas
ValueComparers.pas
ValueComparerSpecs.pas
Values.pas
ValueTests.pas