From a9e0b1bc5df900f966497143e1627f6a9c8d9f47 Mon Sep 17 00:00:00 2001 From: DominikaLos Date: Thu, 5 Dec 2024 12:15:57 +0100 Subject: [PATCH] bugfix: added test for textWrapper --- GsaGHTests/Helpers/GH/TextWrapperTests.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/GsaGHTests/Helpers/GH/TextWrapperTests.cs b/GsaGHTests/Helpers/GH/TextWrapperTests.cs index e349dd6b8..dff0be421 100644 --- a/GsaGHTests/Helpers/GH/TextWrapperTests.cs +++ b/GsaGHTests/Helpers/GH/TextWrapperTests.cs @@ -8,6 +8,13 @@ namespace GsaGHTests.Helpers { [Collection("GrasshopperFixture collection")] public class TextWrapperTests { + [Fact] + public void WrapTextShouldReturnEmptyWhenInputTextIsIsNullOrWhiteSpace() { + Assert.Empty(TextWrapper.WrapText(string.Empty, 1, 1)); + Assert.Empty(TextWrapper.WrapText(null, 1, 1)); + Assert.Empty(TextWrapper.WrapText("\n", 1, 1)); + Assert.Empty(TextWrapper.WrapText(" ", 1, 1)); + } [Fact] public void WrapText_ShouldWrapTextCorrectly() {