Skip to content

Commit

Permalink
bugfix: removed useless test
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikaLos committed Dec 5, 2024
1 parent a059668 commit 0a0bb73
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions GsaGHTests/Helpers/GH/TextWrapperTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@

using GsaGH.Helpers.GH;

using Rhino;
using Rhino.DocObjects;

using Xunit;

namespace GsaGHTests.Helpers {
Expand Down Expand Up @@ -43,30 +40,10 @@ FieldInfo fieldInfo
return (Dictionary<(string, float), float>)fieldInfo.GetValue(null);
}

// Testowanie metody GetFontName
[Fact]
public void GetFontName_ShouldReturnFontNameFromRhino() {
RhinoDoc rhinoDoc = CreateRhinoDocument("test");
string fontName = TextWrapper.GetFontName(rhinoDoc);
CloseRhinoDoc(rhinoDoc);
Assert.Equal("Arial", fontName);
}

[Fact]
public void GetFontName_ShouldReturnDefaultWhenRhinoDocIsNull() {
string fontName = TextWrapper.GetFontName();
Assert.Equal("Arial", fontName);
}

private static RhinoDoc CreateRhinoDocument(string modelTemplateFileName) {
var rhinooDoc = RhinoDoc.Create(modelTemplateFileName);
rhinooDoc.DimStyles.Current.Font = new Font("Test");

return rhinooDoc;
}

private static void CloseRhinoDoc(RhinoDoc rhinoDoc) {
rhinoDoc.Dispose();
}
}
}

0 comments on commit 0a0bb73

Please sign in to comment.