Skip to content

Commit fe15d7e

Browse files
[Add] coverage for extend extension methods (#85)
* [Add] coverage for extend extension methods
1 parent 41aa4ca commit fe15d7e

121 files changed

Lines changed: 5787 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// -------------------------------------------------------------------------------------------------
2+
// <copyright file="AcceptActionUsageExtensionsTestFixture.cs" company="Starion Group S.A.">
3+
//
4+
// Copyright 2022-2026 Starion Group S.A.
5+
//
6+
// Licensed under the Apache License, Version 2.0 (the "License");
7+
// you may not use this file except in compliance with the License.
8+
// You may obtain a copy of the License at
9+
//
10+
// http://www.apache.org/licenses/LICENSE-2.0
11+
//
12+
// Unless required by applicable law or agreed to in writing, software
13+
// distributed under the License is distributed on an "AS IS" BASIS,
14+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
// See the License for the specific language governing permissions and
16+
// limitations under the License.
17+
//
18+
// </copyright>
19+
// ------------------------------------------------------------------------------------------------
20+
21+
namespace SysML2.NET.Tests.Extend
22+
{
23+
using System;
24+
25+
using NUnit.Framework;
26+
27+
using SysML2.NET.Core.POCO.Systems.Actions;
28+
29+
[TestFixture]
30+
public class AcceptActionUsageExtensionsTestFixture
31+
{
32+
[Test]
33+
public void ComputePayloadArgument_ThrowsNotSupportedException()
34+
{
35+
Assert.That(() => ((IAcceptActionUsage)null).ComputePayloadArgument(), Throws.TypeOf<NotSupportedException>());
36+
}
37+
38+
[Test]
39+
public void ComputePayloadParameter_ThrowsNotSupportedException()
40+
{
41+
Assert.That(() => ((IAcceptActionUsage)null).ComputePayloadParameter(), Throws.TypeOf<NotSupportedException>());
42+
}
43+
44+
[Test]
45+
public void ComputeReceiverArgument_ThrowsNotSupportedException()
46+
{
47+
Assert.That(() => ((IAcceptActionUsage)null).ComputeReceiverArgument(), Throws.TypeOf<NotSupportedException>());
48+
}
49+
}
50+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// -------------------------------------------------------------------------------------------------
2+
// <copyright file="ActionDefinitionExtensionsTestFixture.cs" company="Starion Group S.A.">
3+
//
4+
// Copyright 2022-2026 Starion Group S.A.
5+
//
6+
// Licensed under the Apache License, Version 2.0 (the "License");
7+
// you may not use this file except in compliance with the License.
8+
// You may obtain a copy of the License at
9+
//
10+
// http://www.apache.org/licenses/LICENSE-2.0
11+
//
12+
// Unless required by applicable law or agreed to in writing, software
13+
// distributed under the License is distributed on an "AS IS" BASIS,
14+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
// See the License for the specific language governing permissions and
16+
// limitations under the License.
17+
//
18+
// </copyright>
19+
// ------------------------------------------------------------------------------------------------
20+
21+
namespace SysML2.NET.Tests.Extend
22+
{
23+
using System;
24+
25+
using NUnit.Framework;
26+
27+
using SysML2.NET.Core.POCO.Systems.Actions;
28+
29+
[TestFixture]
30+
public class ActionDefinitionExtensionsTestFixture
31+
{
32+
[Test]
33+
public void ComputeAction_ThrowsNotSupportedException()
34+
{
35+
Assert.That(() => ((IActionDefinition)null).ComputeAction(), Throws.TypeOf<NotSupportedException>());
36+
}
37+
}
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// -------------------------------------------------------------------------------------------------
2+
// <copyright file="ActionUsageExtensionsTestFixture.cs" company="Starion Group S.A.">
3+
//
4+
// Copyright 2022-2026 Starion Group S.A.
5+
//
6+
// Licensed under the Apache License, Version 2.0 (the "License");
7+
// you may not use this file except in compliance with the License.
8+
// You may obtain a copy of the License at
9+
//
10+
// http://www.apache.org/licenses/LICENSE-2.0
11+
//
12+
// Unless required by applicable law or agreed to in writing, software
13+
// distributed under the License is distributed on an "AS IS" BASIS,
14+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
// See the License for the specific language governing permissions and
16+
// limitations under the License.
17+
//
18+
// </copyright>
19+
// ------------------------------------------------------------------------------------------------
20+
21+
namespace SysML2.NET.Tests.Extend
22+
{
23+
using System;
24+
25+
using NUnit.Framework;
26+
27+
using SysML2.NET.Core.POCO.Systems.Actions;
28+
29+
[TestFixture]
30+
public class ActionUsageExtensionsTestFixture
31+
{
32+
[Test]
33+
public void ComputeActionDefinition_ThrowsNotSupportedException()
34+
{
35+
Assert.That(() => ((IActionUsage)null).ComputeActionDefinition(), Throws.TypeOf<NotSupportedException>());
36+
}
37+
}
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// -------------------------------------------------------------------------------------------------
2+
// <copyright file="ActorMembershipExtensionsTestFixture.cs" company="Starion Group S.A.">
3+
//
4+
// Copyright 2022-2026 Starion Group S.A.
5+
//
6+
// Licensed under the Apache License, Version 2.0 (the "License");
7+
// you may not use this file except in compliance with the License.
8+
// You may obtain a copy of the License at
9+
//
10+
// http://www.apache.org/licenses/LICENSE-2.0
11+
//
12+
// Unless required by applicable law or agreed to in writing, software
13+
// distributed under the License is distributed on an "AS IS" BASIS,
14+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
// See the License for the specific language governing permissions and
16+
// limitations under the License.
17+
//
18+
// </copyright>
19+
// ------------------------------------------------------------------------------------------------
20+
21+
namespace SysML2.NET.Tests.Extend
22+
{
23+
using System;
24+
25+
using NUnit.Framework;
26+
27+
using SysML2.NET.Core.POCO.Systems.Requirements;
28+
29+
[TestFixture]
30+
public class ActorMembershipExtensionsTestFixture
31+
{
32+
[Test]
33+
public void ComputeOwnedActorParameter_ThrowsNotSupportedException()
34+
{
35+
Assert.That(() => ((IActorMembership)null).ComputeOwnedActorParameter(), Throws.TypeOf<NotSupportedException>());
36+
}
37+
}
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// -------------------------------------------------------------------------------------------------
2+
// <copyright file="AllocationDefinitionExtensionsTestFixture.cs" company="Starion Group S.A.">
3+
//
4+
// Copyright 2022-2026 Starion Group S.A.
5+
//
6+
// Licensed under the Apache License, Version 2.0 (the "License");
7+
// you may not use this file except in compliance with the License.
8+
// You may obtain a copy of the License at
9+
//
10+
// http://www.apache.org/licenses/LICENSE-2.0
11+
//
12+
// Unless required by applicable law or agreed to in writing, software
13+
// distributed under the License is distributed on an "AS IS" BASIS,
14+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
// See the License for the specific language governing permissions and
16+
// limitations under the License.
17+
//
18+
// </copyright>
19+
// ------------------------------------------------------------------------------------------------
20+
21+
namespace SysML2.NET.Tests.Extend
22+
{
23+
using System;
24+
25+
using NUnit.Framework;
26+
27+
using SysML2.NET.Core.POCO.Systems.Allocations;
28+
29+
[TestFixture]
30+
public class AllocationDefinitionExtensionsTestFixture
31+
{
32+
[Test]
33+
public void ComputeAllocation_ThrowsNotSupportedException()
34+
{
35+
Assert.That(() => ((IAllocationDefinition)null).ComputeAllocation(), Throws.TypeOf<NotSupportedException>());
36+
}
37+
}
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// -------------------------------------------------------------------------------------------------
2+
// <copyright file="AllocationDefinitionExtensionsTestFixture.cs" company="Starion Group S.A.">
3+
//
4+
// Copyright 2022-2026 Starion Group S.A.
5+
//
6+
// Licensed under the Apache License, Version 2.0 (the "License");
7+
// you may not use this file except in compliance with the License.
8+
// You may obtain a copy of the License at
9+
//
10+
// http://www.apache.org/licenses/LICENSE-2.0
11+
//
12+
// Unless required by applicable law or agreed to in writing, software
13+
// distributed under the License is distributed on an "AS IS" BASIS,
14+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
// See the License for the specific language governing permissions and
16+
// limitations under the License.
17+
//
18+
// </copyright>
19+
// ------------------------------------------------------------------------------------------------
20+
21+
namespace SysML2.NET.Tests.Extend
22+
{
23+
using System;
24+
25+
using NUnit.Framework;
26+
27+
using SysML2.NET.Core.POCO.Systems.Allocations;
28+
29+
[TestFixture]
30+
public class AllocationUsageExtensionsTestFixture
31+
{
32+
[Test]
33+
public void ComputeAllocationDefinition_ThrowsNotSupportedException()
34+
{
35+
Assert.That(() => ((IAllocationUsage)null).ComputeAllocationDefinition(), Throws.TypeOf<NotSupportedException>());
36+
}
37+
}
38+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// -------------------------------------------------------------------------------------------------
2+
// <copyright file="AnalysisCaseDefinitionExtensionsTestFixture.cs" company="Starion Group S.A.">
3+
//
4+
// Copyright 2022-2026 Starion Group S.A.
5+
//
6+
// Licensed under the Apache License, Version 2.0 (the "License");
7+
// you may not use this file except in compliance with the License.
8+
// You may obtain a copy of the License at
9+
//
10+
// http://www.apache.org/licenses/LICENSE-2.0
11+
//
12+
// Unless required by applicable law or agreed to in writing, software
13+
// distributed under the License is distributed on an "AS IS" BASIS,
14+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
// See the License for the specific language governing permissions and
16+
// limitations under the License.
17+
//
18+
// </copyright>
19+
// ------------------------------------------------------------------------------------------------
20+
21+
namespace SysML2.NET.Tests.Extend
22+
{
23+
using System;
24+
25+
using NUnit.Framework;
26+
27+
using SysML2.NET.Core.POCO.Systems.AnalysisCases;
28+
29+
[TestFixture]
30+
public class AnalysisCaseDefinitionExtensionsTestFixture
31+
{
32+
[Test]
33+
public void ComputeResultExpression_ThrowsNotSupportedException()
34+
{
35+
Assert.That(() => ((IAnalysisCaseDefinition)null).ComputeResultExpression(), Throws.TypeOf<NotSupportedException>());
36+
}
37+
}
38+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// -------------------------------------------------------------------------------------------------
2+
// <copyright file="AnalysisCaseUsageExtensionsTestFixture.cs" company="Starion Group S.A.">
3+
//
4+
// Copyright 2022-2026 Starion Group S.A.
5+
//
6+
// Licensed under the Apache License, Version 2.0 (the "License");
7+
// you may not use this file except in compliance with the License.
8+
// You may obtain a copy of the License at
9+
//
10+
// http://www.apache.org/licenses/LICENSE-2.0
11+
//
12+
// Unless required by applicable law or agreed to in writing, software
13+
// distributed under the License is distributed on an "AS IS" BASIS,
14+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
// See the License for the specific language governing permissions and
16+
// limitations under the License.
17+
//
18+
// </copyright>
19+
// ------------------------------------------------------------------------------------------------
20+
21+
namespace SysML2.NET.Tests.Extend
22+
{
23+
using System;
24+
25+
using NUnit.Framework;
26+
27+
using SysML2.NET.Core.POCO.Systems.AnalysisCases;
28+
29+
[TestFixture]
30+
public class AnalysisCaseUsageExtensionsTestFixture
31+
{
32+
[Test]
33+
public void ComputeAnalysisCaseDefinition_ThrowsNotSupportedException()
34+
{
35+
Assert.That(() => ((IAnalysisCaseUsage)null).ComputeAnalysisCaseDefinition(), Throws.TypeOf<NotSupportedException>());
36+
}
37+
38+
[Test]
39+
public void ComputeResultExpression_ThrowsNotSupportedException()
40+
{
41+
Assert.That(() => ((IAnalysisCaseUsage)null).ComputeResultExpression(), Throws.TypeOf<NotSupportedException>());
42+
}
43+
}
44+
}
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
// -------------------------------------------------------------------------------------------------
2+
// <copyright file="AnnotatingElementExtensionsTestFixture.cs" company="Starion Group S.A.">
3+
//
4+
// Copyright 2022-2026 Starion Group S.A.
5+
//
6+
// Licensed under the Apache License, Version 2.0 (the "License");
7+
// you may not use this file except in compliance with the License.
8+
// You may obtain a copy of the License at
9+
//
10+
// http://www.apache.org/licenses/LICENSE-2.0
11+
//
12+
// Unless required by applicable law or agreed to in writing, software
13+
// distributed under the License is distributed on an "AS IS" BASIS,
14+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
// See the License for the specific language governing permissions and
16+
// limitations under the License.
17+
//
18+
// </copyright>
19+
// ------------------------------------------------------------------------------------------------
20+
21+
namespace SysML2.NET.Tests.Extend
22+
{
23+
using System;
24+
25+
using NUnit.Framework;
26+
27+
using SysML2.NET.Core.POCO.Root.Annotations;
28+
29+
[TestFixture]
30+
public class AnnotatingElementExtensionsTestFixture
31+
{
32+
[Test]
33+
public void ComputeAnnotatedElement_ThrowsNotSupportedException()
34+
{
35+
Assert.That(() => ((IAnnotatingElement)null).ComputeAnnotatedElement(), Throws.TypeOf<NotSupportedException>());
36+
}
37+
38+
[Test]
39+
public void ComputeAnnotation_ThrowsNotSupportedException()
40+
{
41+
Assert.That(() => ((IAnnotatingElement)null).ComputeAnnotation(), Throws.TypeOf<NotSupportedException>());
42+
}
43+
44+
[Test]
45+
public void ComputeOwnedAnnotatingRelationship_ThrowsNotSupportedException()
46+
{
47+
Assert.That(() => ((IAnnotatingElement)null).ComputeOwnedAnnotatingRelationship(), Throws.TypeOf<NotSupportedException>());
48+
}
49+
50+
[Test]
51+
public void ComputeOwningAnnotatingRelationship_ThrowsNotSupportedException()
52+
{
53+
Assert.That(() => ((IAnnotatingElement)null).ComputeOwningAnnotatingRelationship(), Throws.TypeOf<NotSupportedException>());
54+
}
55+
}
56+
}

0 commit comments

Comments
 (0)