Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GeometryTests/GeometryTests.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="MSTest">
<Version>3.9.0</Version>
<Version>3.11.0</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
Expand Down
6 changes: 3 additions & 3 deletions GeometryTests/ThreeDimensional/ConeTests.vb
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,19 @@ Namespace ThreeDimensional.Tests
<TestMethod>
Public Sub Guards_Volume_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Dim unused = Assert.ThrowsException(Of ArgumentException)(Sub() Volume(-1, 2))
Dim unused = Assert.ThrowsExactly(Of ArgumentException)(Sub() Volume(-1, 2))
End Sub

<TestMethod>
Public Sub Guards_Frustum_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Dim unused = Assert.ThrowsException(Of ArgumentException)(Sub() FrustumVolume(3, 3, 2))
Dim unused = Assert.ThrowsExactly(Of ArgumentException)(Sub() FrustumVolume(3, 3, 2))
End Sub

<TestMethod>
Public Sub Guards_PointOnLateralSurface_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Dim unused = Assert.ThrowsException(Of ArgumentException)(Sub() PointOnLateralSurface(0, 0, 0, 3, 5, 0, 1.1))
Dim unused = Assert.ThrowsExactly(Of ArgumentException)(Sub() PointOnLateralSurface(0, 0, 0, 3, 5, 0, 1.1))
End Sub

End Class
Expand Down
10 changes: 5 additions & 5 deletions GeometryTests/ThreeDimensional/CubeTests.vb
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ Namespace ThreeDimensional.Tests
<TestMethod>
Public Sub Guards_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() Volume(-1))
Assert.ThrowsException(Of ArgumentException)(Sub() SideFromVolume(-1))
Assert.ThrowsException(Of ArgumentException)(Sub() SideFromSurfaceArea(-1))
Assert.ThrowsException(Of ArgumentException)(Sub() SideFromSpaceDiagonal(-1))
Assert.ThrowsException(Of ArgumentException)(Sub() VerticesFromCenter(0, 0, 0, -1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() Volume(-1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() SideFromVolume(-1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() SideFromSurfaceArea(-1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() SideFromSpaceDiagonal(-1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() VerticesFromCenter(0, 0, 0, -1))
End Sub

End Class
Expand Down
6 changes: 3 additions & 3 deletions GeometryTests/ThreeDimensional/CuboidTests.vb
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,19 @@ Namespace ThreeDimensional.Tests
<TestMethod>
Public Sub Guards_Volume_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() Volume(-1, 2, 3))
Assert.ThrowsExactly(Of ArgumentException)(Sub() Volume(-1, 2, 3))
End Sub

<TestMethod>
Public Sub Guards_EdgeFromVolume_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() EdgeFromVolume(10, 0, 2))
Assert.ThrowsExactly(Of ArgumentException)(Sub() EdgeFromVolume(10, 0, 2))
End Sub

<TestMethod>
Public Sub Guards_IsCube_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() IsCube(1, 1, 1, 0))
Assert.ThrowsExactly(Of ArgumentException)(Sub() IsCube(1, 1, 1, 0))
End Sub

End Class
Expand Down
6 changes: 3 additions & 3 deletions GeometryTests/ThreeDimensional/CylinderTests.vb
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,19 @@ Namespace ThreeDimensional.Tests
<TestMethod>
Public Sub Guards_Volume_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() Volume(-1, 2))
Assert.ThrowsExactly(Of ArgumentException)(Sub() Volume(-1, 2))
End Sub

<TestMethod>
Public Sub Guards_Hollow_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() HollowVolume(3, 3, 1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() HollowVolume(3, 3, 1))
End Sub

<TestMethod>
Public Sub Guards_PointOnLateralSurface_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() PointOnLateralSurface(0, 0, 0, 2, 5, 0, 6))
Assert.ThrowsExactly(Of ArgumentException)(Sub() PointOnLateralSurface(0, 0, 0, 2, 5, 0, 6))
End Sub

End Class
Expand Down
14 changes: 7 additions & 7 deletions GeometryTests/ThreeDimensional/FrustumTests.vb
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,23 @@ Namespace ThreeDimensional.Tests
<TestMethod>
Public Sub Guards_ConeFrustum_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() ConeFrustumVolume(2, 2, 1))
Assert.ThrowsException(Of ArgumentException)(Sub() ConeFrustumLateralArea(-1, 0, 1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() ConeFrustumVolume(2, 2, 1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() ConeFrustumLateralArea(-1, 0, 1))
End Sub

<TestMethod>
Public Sub Guards_PyramidFrustum_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() PyramidFrustumVolume(4, 3, 4, 2, 5))
Assert.ThrowsException(Of ArgumentException)(Sub() PyramidFrustumSurfaceArea(4, 3, 1, 0, -1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() PyramidFrustumVolume(4, 3, 4, 2, 5))
Assert.ThrowsExactly(Of ArgumentException)(Sub() PyramidFrustumSurfaceArea(4, 3, 1, 0, -1))
End Sub

<TestMethod>
Public Sub Guards_PrismFrustum_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() PrismFrustumVolume(-1, 2, 1))
Assert.ThrowsException(Of ArgumentException)(Sub() PrismFrustumLateralArea(1, -1, 1))
Assert.ThrowsException(Of ArgumentException)(Sub() PrismFrustumSurfaceArea(1, 1, 1, 1, -1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() PrismFrustumVolume(-1, 2, 1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() PrismFrustumLateralArea(1, -1, 1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() PrismFrustumSurfaceArea(1, 1, 1, 1, -1))
End Sub

End Class
Expand Down
16 changes: 8 additions & 8 deletions GeometryTests/ThreeDimensional/PrismTests.vb
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,24 @@ Namespace ThreeDimensional.Tests
<TestMethod>
Public Sub Guards_General_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() Volume(-1, 1))
Assert.ThrowsException(Of ArgumentException)(Sub() LateralArea(1, -1))
Assert.ThrowsException(Of ArgumentException)(Sub() SurfaceArea(1, -1, 1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() Volume(-1, 1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() LateralArea(1, -1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() SurfaceArea(1, -1, 1))
End Sub

<TestMethod>
Public Sub Guards_Triangular_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() TriangularBaseArea(1, 2, 3))
Assert.ThrowsException(Of ArgumentException)(Sub() TriangularPrismVolume(3, 4, 5, -1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() TriangularBaseArea(1, 2, 3))
Assert.ThrowsExactly(Of ArgumentException)(Sub() TriangularPrismVolume(3, 4, 5, -1))
End Sub

<TestMethod>
Public Sub Guards_RegularPolygon_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() RegularPolygonBaseArea(1, 2))
Assert.ThrowsException(Of ArgumentException)(Sub() RegularPolygonPrismVolume(-1, 6, 1))
Assert.ThrowsException(Of ArgumentException)(Sub() RegularPolygonPrismSurfaceArea(1, 6, -1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() RegularPolygonBaseArea(1, 2))
Assert.ThrowsExactly(Of ArgumentException)(Sub() RegularPolygonPrismVolume(-1, 6, 1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() RegularPolygonPrismSurfaceArea(1, 6, -1))
End Sub

End Class
Expand Down
6 changes: 3 additions & 3 deletions GeometryTests/ThreeDimensional/PyramidTests.vb
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,19 @@ Namespace ThreeDimensional.Tests
<TestMethod>
Public Sub Guards_BaseArea_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() BaseArea(-1, 2))
Assert.ThrowsExactly(Of ArgumentException)(Sub() BaseArea(-1, 2))
End Sub

<TestMethod>
Public Sub Guards_Frustum_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() FrustumVolume(4, 3, 4, 2, 5))
Assert.ThrowsExactly(Of ArgumentException)(Sub() FrustumVolume(4, 3, 4, 2, 5))
End Sub

<TestMethod>
Public Sub Guards_Vertices_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() VerticesFromCenter(0, 0, 0, -1, 1, 1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() VerticesFromCenter(0, 0, 0, -1, 1, 1))
End Sub

End Class
Expand Down
6 changes: 3 additions & 3 deletions GeometryTests/ThreeDimensional/SphereTests.vb
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,19 @@ Namespace ThreeDimensional.Tests
<TestMethod>
Public Sub Guards_Volume_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() Volume(-1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() Volume(-1))
End Sub

<TestMethod>
Public Sub Guards_SphericalCapVolume_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() SphericalCapVolume(2, 5))
Assert.ThrowsExactly(Of ArgumentException)(Sub() SphericalCapVolume(2, 5))
End Sub

<TestMethod>
Public Sub Guards_PointOnSphere_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() PointOnSphere(0, 0, 0, 2, -0.1, 0))
Assert.ThrowsExactly(Of ArgumentException)(Sub() PointOnSphere(0, 0, 0, 2, -0.1, 0))
End Sub

End Class
Expand Down
3 changes: 1 addition & 2 deletions GeometryTests/TwoDimensional/CircleTests.vb
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,9 @@ Namespace TwoDimensional.Tests
End Sub

<TestMethod()>
<ExpectedException(GetType(ArgumentException))>
Public Sub NegativeRadius_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Dim unused = Area(-1.0)
Assert.ThrowsExactly(Of ArgumentException)(Sub() Area(-1.0))
End Sub

End Class
Expand Down
6 changes: 3 additions & 3 deletions GeometryTests/TwoDimensional/KiteTests.vb
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,19 @@ Namespace TwoDimensional.Tests
<TestMethod>
Public Sub Guards_AreaFromDiagonals_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() AreaFromDiagonals(-1, 2))
Assert.ThrowsExactly(Of ArgumentException)(Sub() AreaFromDiagonals(-1, 2))
End Sub

<TestMethod>
Public Sub Guards_HeightFromArea_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() HeightFromArea(10, 0))
Assert.ThrowsExactly(Of ArgumentException)(Sub() HeightFromArea(10, 0))
End Sub

<TestMethod>
Public Sub Guards_IsKiteFromVertices_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() IsKiteFromVertices(New PointF() {New PointF(0, 0), New PointF(1, 0), New PointF(1, 1)}))
Assert.ThrowsExactly(Of ArgumentException)(Sub() IsKiteFromVertices(New PointF() {New PointF(0, 0), New PointF(1, 0), New PointF(1, 1)}))
End Sub

End Class
Expand Down
10 changes: 5 additions & 5 deletions GeometryTests/TwoDimensional/ParallelogramTests.vb
Original file line number Diff line number Diff line change
Expand Up @@ -68,31 +68,31 @@ Namespace TwoDimensional.Tests
<TestMethod>
Public Sub Guards_Area_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() Area(-1, 2))
Assert.ThrowsExactly(Of ArgumentException)(Sub() Area(-1, 2))
End Sub

<TestMethod>
Public Sub Guards_DiagonalBySidesAndAngle_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() DiagonalBySidesAndAngle(5, 3, 0))
Assert.ThrowsExactly(Of ArgumentException)(Sub() DiagonalBySidesAndAngle(5, 3, 0))
End Sub

<TestMethod>
Public Sub Guards_InteriorAngleFromSidesAndDiagonals_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() InteriorAngleFromSidesAndDiagonals(5, 3, 100, 1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() InteriorAngleFromSidesAndDiagonals(5, 3, 100, 1))
End Sub

<TestMethod>
Public Sub Guards_AreaFromVertices_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() AreaFromVertices(New PointF() {New PointF(0, 0), New PointF(1, 1)}))
Assert.ThrowsExactly(Of ArgumentException)(Sub() AreaFromVertices(New PointF() {New PointF(0, 0), New PointF(1, 1)}))
End Sub

<TestMethod>
Public Sub Guards_IsParallelogramFromVertices_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() IsParallelogramFromVertices(New PointF() {New PointF(0, 0), New PointF(1, 0), New PointF(1, 1)}))
Assert.ThrowsExactly(Of ArgumentException)(Sub() IsParallelogramFromVertices(New PointF() {New PointF(0, 0), New PointF(1, 0), New PointF(1, 1)}))
End Sub

End Class
Expand Down
6 changes: 3 additions & 3 deletions GeometryTests/TwoDimensional/PolygonTests.vb
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Namespace TwoDimensional.Tests
<TestMethod>
Public Sub Guards_Area_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() Area(New PointF() {New PointF(0, 0), New PointF(1, 1)}))
Assert.ThrowsExactly(Of ArgumentException)(Sub() Area(New PointF() {New PointF(0, 0), New PointF(1, 1)}))
End Sub

<TestMethod>
Expand All @@ -127,7 +127,7 @@ Namespace TwoDimensional.Tests
New PointF(0, 1)
}

Assert.ThrowsException(Of ArgumentException)(Sub() IsConvex(points, 0))
Assert.ThrowsExactly(Of ArgumentException)(Sub() IsConvex(points, 0))
End Sub

<TestMethod>
Expand All @@ -139,7 +139,7 @@ Namespace TwoDimensional.Tests
New PointF(2, 2)
}

Assert.ThrowsException(Of ArgumentException)(Sub() Centroid(collinear))
Assert.ThrowsExactly(Of ArgumentException)(Sub() Centroid(collinear))
End Sub

End Class
Expand Down
6 changes: 3 additions & 3 deletions GeometryTests/TwoDimensional/RegularPolygonTests.vb
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ Namespace TwoDimensional.Tests
<TestMethod>
Public Sub Guards_Area_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() Area(-1, 5))
Assert.ThrowsException(Of ArgumentException)(Sub() Area(1, 2))
Assert.ThrowsExactly(Of ArgumentException)(Sub() Area(-1, 5))
Assert.ThrowsExactly(Of ArgumentException)(Sub() Area(1, 2))
End Sub

<TestMethod>
Public Sub Guards_IsRegularFromVertices_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() IsRegularFromVertices(New PointF() {New PointF(0, 0), New PointF(1, 0)}))
Assert.ThrowsExactly(Of ArgumentException)(Sub() IsRegularFromVertices(New PointF() {New PointF(0, 0), New PointF(1, 0)}))
End Sub

End Class
Expand Down
6 changes: 3 additions & 3 deletions GeometryTests/TwoDimensional/RhombusTests.vb
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,19 @@ Namespace TwoDimensional.Tests
<TestMethod>
Public Sub Guards_AreaFromBaseHeight_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() AreaFromBaseHeight(-1, 2))
Assert.ThrowsExactly(Of ArgumentException)(Sub() AreaFromBaseHeight(-1, 2))
End Sub

<TestMethod>
Public Sub Guards_DiagonalFromSideAndAngle_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() DiagonalFromSideAndAngle(4, 0))
Assert.ThrowsExactly(Of ArgumentException)(Sub() DiagonalFromSideAndAngle(4, 0))
End Sub

<TestMethod>
Public Sub Guards_IsRhombusFromVertices_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() IsRhombusFromVertices(New PointF() {New PointF(0, 0), New PointF(1, 0), New PointF(1, 1)}))
Assert.ThrowsExactly(Of ArgumentException)(Sub() IsRhombusFromVertices(New PointF() {New PointF(0, 0), New PointF(1, 0), New PointF(1, 1)}))
End Sub

End Class
Expand Down
6 changes: 3 additions & 3 deletions GeometryTests/TwoDimensional/SquareTests.vb
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,13 @@ Namespace TwoDimensional.Tests
<TestMethod>
Public Sub Guards_Area_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() Area(-1))
Assert.ThrowsExactly(Of ArgumentException)(Sub() Area(-1))
End Sub

<TestMethod>
Public Sub Guards_IsSquareFromVertices_Throws_Test()
' Führt den Testfall aus und prüft das erwartete Ergebnis.
Assert.ThrowsException(Of ArgumentException)(Sub() IsSquareFromVertices(New PointF() {New PointF(0, 0), New PointF(1, 0), New PointF(1, 1)}))
Assert.ThrowsExactly(Of ArgumentException)(Sub() IsSquareFromVertices(New PointF() {New PointF(0, 0), New PointF(1, 0), New PointF(1, 1)}))
End Sub

<TestMethod>
Expand All @@ -74,7 +74,7 @@ Namespace TwoDimensional.Tests
New PointF(1, 1),
New PointF(0, 1)
}
Assert.ThrowsException(Of ArgumentException)(Sub() IsSquareFromVertices(vertices, 0))
Assert.ThrowsExactly(Of ArgumentException)(Sub() IsSquareFromVertices(vertices, 0))
End Sub

End Class
Expand Down
Loading
Loading