Skip to content

Commit 6e52b13

Browse files
committed
Merge branch 'develop' into Test_Toolkit-InvestigateRunningAllChecksThroughNUnit
2 parents 7f7116e + c546a5c commit 6e52b13

File tree

3 files changed

+31
-2
lines changed

3 files changed

+31
-2
lines changed

.ci/unit-tests/Test_Engine_Tests/Compute/DummyObjects.cs

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,26 @@
1-
using BH.Engine.Diffing;
1+
/*
2+
* This file is part of the Buildings and Habitats object Model (BHoM)
3+
* Copyright (c) 2015 - 2025, the respective contributors. All rights reserved.
4+
*
5+
* Each contributor holds copyright over their respective contributions.
6+
* The project versioning (Git) records all such contribution source information.
7+
*
8+
*
9+
* The BHoM is free software: you can redistribute it and/or modify
10+
* it under the terms of the GNU Lesser General Public License as published by
11+
* the Free Software Foundation, either version 3.0 of the License, or
12+
* (at your option) any later version.
13+
*
14+
* The BHoM is distributed in the hope that it will be useful,
15+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
* GNU Lesser General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Lesser General Public License
20+
* along with this code. If not, see <https://www.gnu.org/licenses/lgpl-3.0.html>.
21+
*/
22+
23+
using BH.Engine.Diffing;
224
using NUnit.Framework;
325
using System;
426
using System.Collections.Generic;
@@ -50,6 +72,7 @@ private bool IsValidPropType(Type propertyType)
5072
{
5173
if(typeof(Stream).IsAssignableFrom(propertyType) ||
5274
typeof(Delegate).IsAssignableFrom(propertyType) ||
75+
typeof(System.Drawing.Bitmap).IsAssignableFrom(propertyType) || //Temporarily excluded unitl https://github.com/BHoM/Test_Toolkit/issues/526 has been resolved
5376
propertyType.Namespace.StartsWith("Microsoft.CodeAnalysis.CSharp"))
5477
{
5578
return false; // Skip properties of these types

CodeComplianceTest_Engine/Query/Checks/MethodNameContainsFileName.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,12 @@ namespace BH.Engine.Test.CodeCompliance.Checks
3535
public static partial class Query
3636
{
3737
[Message("Method name must start with or end with the name of the file", "MethodNameContainsFileName")]
38-
[Path(@"([a-zA-Z0-9]+)_(Engine|Tests)\\.*\.cs$")]
38+
[Path(@"([a-zA-Z0-9]+)_Engine\\.*\.cs$")]
3939
[Path(@"([a-zA-Z0-9]+)_Engine\\Convert\\.*\.cs$", false)]
4040
[Path(@"([a-zA-Z0-9]+)_Engine\\Objects\\.*\.cs$", false)]
41+
[Path(@"([a-zA-Z0-9]+)_Engine\\Create\\.*\.cs$", false)]
42+
[Path(@"([a-zA-Z0-9]+)_Tests\\.*\.cs$", false)] //NUnit style projects
43+
[Path(@"([a-zA-Z0-9]+)_Test\\.*\.cs$", false)] //Verification projects
4144
[IsPublic()]
4245
[ComplianceType("code")]
4346
[ErrorLevel(TestStatus.Error)]

Test_Engine/Compute/DummyObject.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@ private static object GetValue(Type type, int depth)
178178
return System.Drawing.Color.FromArgb(1, 2, 3, 4);
179179
else if (type == typeof(System.Drawing.Bitmap))
180180
{
181+
//Returning the bitmap below is causing issues at arbitrary times with the serialisation check. Commenting this out for now and returning null until it can be properly investigated.
182+
//Issue raised for this to be resolved: https://github.com/BHoM/Test_Toolkit/issues/526
183+
return null;
181184
System.Drawing.Bitmap bitmap = new System.Drawing.Bitmap(20, 20, System.Drawing.Imaging.PixelFormat.Format24bppRgb);
182185

183186
// 2. Get access to the raw bitmap data

0 commit comments

Comments
 (0)