Skip to content

Commit 2e0a173

Browse files
Fix unit tests
1 parent 6f5a9d2 commit 2e0a173

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

SysML2.NET.Tests/Extend/FeatureExtensionsTestFixture.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ public void VerifyComputeIsFeaturedWithinOperation()
742742
// a feature whose featuringType is a specific Type is featured within that Type.
743743
var owningType = new Type();
744744
var owningTypeFeaturing = new TypeFeaturing { FeatureOfType = feature, FeaturingType = owningType };
745-
feature.AssignOwnership(owningTypeFeaturing, new Feature());
745+
feature.AssignOwnership(owningTypeFeaturing);
746746

747747
using (Assert.EnterMultipleScope())
748748
{
@@ -767,11 +767,11 @@ public void VerifyComputeCanAccessOperation()
767767
// that same Type — subject can access target.
768768
var sharedType = new Type();
769769
var subjectTypeFeaturing = new TypeFeaturing { FeatureOfType = feature, FeaturingType = sharedType };
770-
feature.AssignOwnership(subjectTypeFeaturing, new Feature());
770+
feature.AssignOwnership(subjectTypeFeaturing);
771771

772772
var target = new Feature();
773773
var targetTypeFeaturing = new TypeFeaturing { FeatureOfType = target, FeaturingType = sharedType };
774-
target.AssignOwnership(targetTypeFeaturing, new Feature());
774+
target.AssignOwnership(targetTypeFeaturing);
775775

776776
Assert.That(feature.ComputeCanAccessOperation(target), Is.True);
777777
}
@@ -833,16 +833,16 @@ public void VerifyComputeRedefinedSupertypesOperation()
833833
// is filtered when excludeImplied = true.
834834
var general = new Type();
835835
var specialization = new Specialization { Specific = feature, General = general };
836-
feature.AssignOwnership(specialization, general);
836+
feature.AssignOwnership(specialization);
837837

838838
var impliedGeneral = new Type();
839839
var impliedSpecialization = new Specialization { Specific = feature, General = impliedGeneral, IsImplied = true };
840-
feature.AssignOwnership(impliedSpecialization, impliedGeneral);
840+
feature.AssignOwnership(impliedSpecialization);
841841

842842
using (Assert.EnterMultipleScope())
843843
{
844-
Assert.That(feature.ComputeRedefinedSupertypesOperation(false), Is.EquivalentTo(new[] { general, impliedGeneral }));
845-
Assert.That(feature.ComputeRedefinedSupertypesOperation(true), Is.EquivalentTo(new[] { general }));
844+
Assert.That(feature.ComputeRedefinedSupertypesOperation(false), Is.EquivalentTo([general, impliedGeneral]));
845+
Assert.That(feature.ComputeRedefinedSupertypesOperation(true), Is.EquivalentTo([general]));
846846
}
847847
}
848848

@@ -860,13 +860,13 @@ public void VerifyComputeTypingFeaturesOperation()
860860
// is excluded.
861861
var subsettedFeature = new Feature();
862862
var subsetting = new Subsetting { SubsettedFeature = subsettedFeature };
863-
feature.AssignOwnership(subsetting, new Feature());
863+
feature.AssignOwnership(subsetting);
864864

865865
var crossSubsettedFeature = new Feature();
866866
var crossSubsetting = new CrossSubsetting { CrossedFeature = crossSubsettedFeature };
867-
feature.AssignOwnership(crossSubsetting, new Feature());
867+
feature.AssignOwnership(crossSubsetting);
868868

869-
Assert.That(feature.ComputeTypingFeaturesOperation(), Is.EquivalentTo(new[] { subsettedFeature }));
869+
Assert.That(feature.ComputeTypingFeaturesOperation(), Is.EquivalentTo([subsettedFeature]));
870870
}
871871

872872
[Test]
@@ -884,14 +884,14 @@ public void VerifyComputeSubsetsChainOperation()
884884
// populated: a feature with chaining [first, second] satisfies the chain match.
885885
var matching = new Feature();
886886
var chaining1 = new FeatureChaining { ChainingFeature = first };
887-
matching.AssignOwnership(chaining1, new Feature());
887+
matching.AssignOwnership(chaining1);
888888

889889
var chaining2 = new FeatureChaining { ChainingFeature = second };
890-
matching.AssignOwnership(chaining2, new Feature());
890+
matching.AssignOwnership(chaining2);
891891

892892
// The subject specializes the matching feature so it shows up in the BFS visited set.
893893
var specialization = new Specialization { Specific = feature, General = matching };
894-
feature.AssignOwnership(specialization, matching);
894+
feature.AssignOwnership(specialization);
895895

896896
using (Assert.EnterMultipleScope())
897897
{
@@ -914,7 +914,7 @@ public void VerifyComputeRedefinedIsCompatibleWithOperation()
914914
// populated: a feature that specializes a Type is compatible with that Type.
915915
var supertype = new Type();
916916
var specialization = new Specialization { Specific = feature, General = supertype };
917-
feature.AssignOwnership(specialization, supertype);
917+
feature.AssignOwnership(specialization);
918918

919919
Assert.That(feature.ComputeRedefinedIsCompatibleWithOperation(supertype), Is.True);
920920
}
@@ -949,7 +949,7 @@ public void VerifyComputeRedefinesFromLibraryOperation()
949949
rootNamespace.AssignOwnership(subjectMembership, subject);
950950

951951
var redefinition = new Redefinition { RedefinedFeature = libraryFeature };
952-
subject.AssignOwnership(redefinition, new Feature());
952+
subject.AssignOwnership(redefinition);
953953

954954
using (Assert.EnterMultipleScope())
955955
{

0 commit comments

Comments
 (0)