Gemeinsam zu mehr Effizienz in der Anwendungserstellung
K (→Beispiele) |
K (→Beispiele) |
||
Zeile 27: | Zeile 27: | ||
<source> | <source> | ||
Public Sub Test3() | Public Sub Test3() | ||
- | Dim testResult As | + | Dim testResult As Double |
testResult = VBA.Math.Sqr(4.5) | testResult = VBA.Math.Sqr(4.5) | ||
Assert.That testResult, Iz.Not.EqualTo(2) | Assert.That testResult, Iz.Not.EqualTo(2) | ||
- | |||
End Sub | End Sub | ||
</source> | </source> |
SimplyVBUnit ist ein Test-Framework für VB6 und VBA, das sich an NUnit orientiert.
Projektseite: http://sourceforge.net/projects/simplyvbunit/
Public Sub Test1() Dim testResult As Double testResult = VBA.Math.Sqr(4) Assert.AreEqual 2, testResult End Sub
Public Sub Test2() Dim testResult As Double testResult = VBA.Math.Sqr(4) Assert.That testResult, Iz.EqualTo(2) End Sub
Public Sub Test3() Dim testResult As Double testResult = VBA.Math.Sqr(4.5) Assert.That testResult, Iz.Not.EqualTo(2) End Sub