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 .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '9.0.x'

- name: Install dotnet format
run: dotnet tool update --global dotnet-format
Expand Down
8 changes: 8 additions & 0 deletions bcf-toolkit.sln.DotSettings.user
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AXDocument_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fcc158b0877cb1b3b66c7d696becfcb9edc86d3cd1611ef9a2468f8162b7b_003FXDocument_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/Environment/Highlighting/HighlightingSourceSnapshotLocation/@EntryValue">/Users/balintbende/Library/Caches/JetBrains/Rider2024.1/resharper-host/temp/Rider/vAny/CoverageData/_bcf-toolkit.-1315391344/Snapshot/snapshot.utdcvr</s:String>
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=00488d9b_002Ddfb9_002D47fc_002Da7da_002D60da862eab61/@EntryIndexedValue">&lt;SessionState ContinuousTestingMode="0" Name="All tests from Solution #2" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"&gt;
&lt;Solution /&gt;
&lt;/SessionState&gt;</s:String>
<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=1968bffa_002D93c7_002D49e1_002D98c2_002Dd3709caea64e/@EntryIndexedValue">&lt;SessionState ContinuousTestingMode="0" IsActive="True" Name="All tests from Solution" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"&gt;
&lt;Solution /&gt;
&lt;/SessionState&gt;</s:String>


<s:String x:Key="/Default/Environment/UnitTesting/UnitTestSessionStore/Sessions/=4dc5af78_002D6a8f_002D4f5b_002D8833_002Df0ff81e0c049/@EntryIndexedValue">&lt;SessionState ContinuousTestingMode="0" IsActive="True" Name="All tests from Solution #3" xmlns="urn:schemas-jetbrains-com:jetbrains-ut-session"&gt;
&lt;Solution /&gt;
&lt;/SessionState&gt;</s:String>
Expand Down Expand Up @@ -79,6 +85,8 @@








Expand Down
2 changes: 1 addition & 1 deletion src/bcf-toolkit/Model/Bcf21/VisInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -722,9 +722,9 @@ public bool BitmapSpecified

/// <summary>
/// <para xml:lang="en">Pattern: [a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}.</para>
/// This field is required but was not mentioned in the documentation.
/// </summary>
[System.ComponentModel.DataAnnotations.RegularExpressionAttribute("[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}")]
[System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
[System.Xml.Serialization.XmlAttributeAttribute("Guid")]
public string Guid { get; set; }
}
Expand Down
2 changes: 1 addition & 1 deletion src/bcf-toolkit/Model/Bcf30/Visinfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -789,9 +789,9 @@ public bool BitmapsSpecified

/// <summary>
/// <para xml:lang="en">Pattern: [a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}.</para>
/// This field is required but was not mentioned in the documentation.
/// </summary>
[System.ComponentModel.DataAnnotations.RegularExpressionAttribute("[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}")]
[System.ComponentModel.DataAnnotations.RequiredAttribute(AllowEmptyStrings=true)]
[System.Xml.Serialization.XmlAttributeAttribute("Guid")]
public string Guid { get; set; }
}
Expand Down
2 changes: 1 addition & 1 deletion src/bcf-toolkit/bcf-toolkit.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<PackageId>Smino.Bcf.Toolkit</PackageId>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<Title>bcf-toolkit</Title>
Expand Down
2 changes: 1 addition & 1 deletion src/tests/Builder/Bcf21/BcfBuilderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using BcfToolkit.Model.Bcf21;
using NUnit.Framework;

namespace tests.Builder.Bcf21;
namespace Tests.Builder.Bcf21;

public class BcfBuilderTests {
private BcfBuilder _builder = null!;
Expand Down
5 changes: 2 additions & 3 deletions src/tests/Builder/Bcf21/SuperBcfFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using BcfToolkit.Model.Bcf21;
using NUnit.Framework;

namespace tests.Builder.Bcf21;
namespace Tests.Builder.Bcf21;


public class SuperBcfFile {
Expand Down Expand Up @@ -162,7 +162,7 @@ public async Task CreateSuperBcf21File() {

var visualizationInfo =
visualizationInfoBuilder
.SetGuid("333b4df2-0187-49a9-8a4a-23992696bafd")
// .SetGuid("333b4df2-0187-49a9-8a4a-23992696bafd")
.SetOrthogonalCamera(ortho)
.SetViewSetupHints(vsHint)
.AddBitmaps(visBitmaps)
Expand Down Expand Up @@ -235,7 +235,6 @@ public async Task CreateSuperBcf21File() {
.SetProjectId("3ZSh2muKX7S8MCESk95seC")
.SetProjectName("projectName")
.SetExtensionSchema("extensionSchema"))
// .SetDocumentData(docData)
.Build();

await _converter.ToBcf(bcf,
Expand Down
2 changes: 1 addition & 1 deletion src/tests/Builder/Bcf30/BcfBuilderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using BcfToolkit.Builder.Bcf30;
using NUnit.Framework;

namespace tests.Builder.Bcf30;
namespace Tests.Builder.Bcf30;

public class BcfBuilderTests {
private BcfBuilder _builder = null!;
Expand Down
3 changes: 1 addition & 2 deletions src/tests/Builder/Bcf30/SuperBcfFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
using BcfBuilder = BcfToolkit.Builder.Bcf30.BcfBuilder;
using File = BcfToolkit.Model.Bcf30.File;

namespace tests.Builder.Bcf30;
namespace Tests.Builder.Bcf30;


public class SuperBcfFile {
Expand Down Expand Up @@ -168,7 +168,6 @@ public async Task CreateSuperBcf30File() {

var visualizationInfo =
visualizationInfoBuilder
.SetGuid("334b4df2-0187-49a9-8a4a-23992696bafd")
.SetPerspectiveCamera(pers)
.AddBitmaps(bitmaps)
.AddColorings(colorings)
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion src/tests/Utils/BcfExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using bcf21 = BcfToolkit.Model.Bcf21;
using bcf30 = BcfToolkit.Model.Bcf30;

namespace tests.Utils;
namespace Tests.Utils;

[TestFixture]
public class BcfExtensionsTests {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/Utils/JsonExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using bcf21 = BcfToolkit.Model.Bcf21;
using bcf30 = BcfToolkit.Model.Bcf30;

namespace tests.Utils;
namespace Tests.Utils;

public class JsonExtensionsTests {
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/tests/Utils/ZipArchiveEntryExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using BcfToolkit.Utils;
using NUnit.Framework;

namespace tests.Utils;
namespace Tests.Utils;

[TestFixture]
public class ZipArchiveEntryExtensionsTests {
Expand Down
46 changes: 2 additions & 44 deletions src/tests/WorkerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,12 @@ public async Task BuildBcfFromV21StreamTest() {
[Category("BCF v2.1")]
public async Task BuildBcfFromV21StreamSamplesTests() {
var samples = new List<string> {
// "Resources/Bcf/v2.1/AllPartsVisible.bcfzip", // assigned to is empty
"Resources/Bcf/v2.1/ComponentSelection.bcfzip",
"Resources/Bcf/v2.1/ExternalBIMSnippet.bcfzip",
"Resources/Bcf/v2.1/MaximumInformation.bcfzip",
"Resources/Bcf/v2.1/MinimumInformation.bcfzip",
"Resources/Bcf/v2.1/MiniSolibri.bcfzip",
// "Resources/Bcf/v2.1/RelatedTopics.bcfzip", // comment property is empty
// "Resources/Bcf/v2.1/SingleVisibleWall.bcfzip", // comment property is empty
// "Resources/Bcf/v2.1/UserAssignment.bcfzip" // description is empty
"Resources/Bcf/v2.1/MissingVisualizationInfoGuid.bcfzip"
};

var tasks = samples.Select(async path => {
Expand Down Expand Up @@ -143,38 +140,6 @@ private async Task CheckBcfStreamVersion(
await stream.FlushAsync();
}

// [Test]
// [Category("BCF v3.0")]
// public async Task BcfV30ToV21StreamSamplesTests() {
// var samples = new List<string> {
// "Resources/Bcf/v3.0/ComponentSelection.bcfzip",
// "Resources/Bcf/v3.0/DocumentReferenceExternal.bcfzip",
// "Resources/Bcf/v3.0/DocumentReferenceInternal.bcfzip",
// "Resources/Bcf/v3.0/DueDate.bcfzip",
// "Resources/Bcf/v3.0/Labels.bcfzip",
// "Resources/Bcf/v3.0/Milestone.bcfzip",
// "Resources/Bcf/v3.0/RelatedTopics.bcfzip",
// "Resources/Bcf/v3.0/SingleInvisibleWall.bcfzip",
// "Resources/Bcf/v3.0/TestBcf30.bcfzip",
// "Resources/Bcf/v3.0/TopicsWithDifferentModelsVisible.bcfzip",
// "Resources/Bcf/v3.0/UserAssignment.bcfzip"
// };
//
// var tasks = samples.Select(async path => {
// var builder = new BcfToolkit.Builder.Bcf30.BcfBuilder();
// await using var inputStream =
// new FileStream(path, FileMode.Open, FileAccess.Read);
//
// var bcf = await builder.BuildFromStream(inputStream);
// var stream = await _worker.ToBcf(bcf, BcfVersionEnum.Bcf21);
// var version = await BcfExtensions.GetVersionFromStreamArchive(stream);
// Assert.That(BcfVersionEnum.Bcf21, Is.EqualTo(version));
// await stream.FlushAsync();
// }).ToArray();
//
// await Task.WhenAll(tasks);
// }

[Test]
[Category("BCF v2.1")]
public async Task ConvertBcfZipToJsonV21SamplesTests() {
Expand Down Expand Up @@ -207,7 +172,7 @@ public async Task ConvertBcfZipToJsonV30SamplesTests() {
"Resources/Bcf/v3.0/SingleInvisibleWall.bcfzip",
"Resources/Bcf/v3.0/TestBcf30.bcfzip",
"Resources/Bcf/v3.0/TopicsWithDifferentModelsVisible.bcfzip",
"Resources/Bcf/v3.0/UserAssignment.bcfzip"
"Resources/Bcf/v3.0/UserAssignment.bcfzip",
};
var tasks = samples.Select(async source => {
var target =
Expand Down Expand Up @@ -346,12 +311,5 @@ public async Task ToBcfWithFileStream() {

await outputStream.FlushAsync();
outputStream.Close();

// await using var inputStream = new FileStream(
// path,
// FileMode.Open,
// FileAccess.Read);
// var bcfResult = await _worker.BcfFromStream(inputStream);
// Assert.That(bcfResult.Markups.Count, Is.EqualTo(1));
}
}
2 changes: 1 addition & 1 deletion src/tests/tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>

<IsPackable>false</IsPackable>

Expand Down
Loading