Skip to content

Commit

Permalink
Erweiterung der Funktion um Parameter-Übergabe
Browse files Browse the repository at this point in the history
  • Loading branch information
INOPIAE committed Jun 4, 2023
1 parent 5a01b27 commit 463e30a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
18 changes: 15 additions & 3 deletions TestUnitReiheTest/TestReihe.vb
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,24 @@ Namespace TestUnitReiheTest

<Test>
Public Sub TestReihe()
Dim Eingabe As Short
Dim Vorgabe As Short
Dim Ergebnis

Ergebnis = CF.Reihe()
Eingabe = 4
Vorgabe = 4

Assert.AreEqual(0, Ergebnis)
Assert.AreNotEqual(1, Ergebnis)
Ergebnis = CF.Reihe(Eingabe)

Assert.AreEqual(Vorgabe, Ergebnis)


Eingabe = 100
Vorgabe = 100

Ergebnis = CF.Reihe(Eingabe)

Assert.AreEqual(Vorgabe, Ergebnis)
End Sub

End Class
Expand Down
4 changes: 2 additions & 2 deletions inoUnitReihe/ClsFunktion.vb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Public Class ClsFunktion
Public Function Reihe() As Short
Return Nothing
Public Function Reihe(Eingabe As Short) As Short
Return Eingabe
End Function

End Class

0 comments on commit 463e30a

Please sign in to comment.