@@ -24,7 +24,7 @@ public void SetUp()
24
24
public void GetOptimalWith_WhenOnlyHavingOneNodeAndResourceId_ShouldGetResourceId ( )
25
25
{
26
26
var node = new Node ( new XElement ( "node" , new XAttribute ( "resource-id" , "test" ) ) , null ) ;
27
- var withs = _uniqueWithFinderService . GetUniqueWiths ( node , new List < Node > ( ) { node } ) ;
27
+ var withs = _uniqueWithFinderService . GetUniqueWiths ( node , new List < Node > ( ) { node } , false ) ;
28
28
Assert . AreEqual ( 1 , withs . Withs . Count ) ;
29
29
Assert . AreEqual ( AttributeTags . ResourceId , withs . Withs . First ( ) ) ;
30
30
}
@@ -33,7 +33,7 @@ public void GetOptimalWith_WhenOnlyHavingOneNodeAndResourceId_ShouldGetResourceI
33
33
public void GetOptimalWith_WhenOnlyHavingOneNodeResourceIdIsEmpty_ShouldNotGetResourceId ( )
34
34
{
35
35
var node = new Node ( new XElement ( "node" , new XAttribute ( "resource-id" , "" ) , new XAttribute ( "package" , "test" ) ) , null ) ;
36
- var withs = _uniqueWithFinderService . GetUniqueWiths ( node , new List < Node > ( ) { node } ) ;
36
+ var withs = _uniqueWithFinderService . GetUniqueWiths ( node , new List < Node > ( ) { node } , false ) ;
37
37
Assert . AreEqual ( 1 , withs . Withs . Count ) ;
38
38
Assert . AreEqual ( AttributeTags . Package , withs . Withs . First ( ) ) ;
39
39
}
@@ -43,7 +43,7 @@ public void GetOptimalWith_WhenOnlyHavingTwoWithSameResoruceId_ShouldGetPackage(
43
43
{
44
44
var node = new Node ( new XElement ( "node" , new XAttribute ( "resource-id" , "test" ) , new XAttribute ( "package" , "test" ) ) , null ) ;
45
45
var secondNode = new Node ( new XElement ( "node" , new XAttribute ( "resource-id" , "test" ) ) , null ) ;
46
- var withs = _uniqueWithFinderService . GetUniqueWiths ( node , new List < Node > ( ) { node , secondNode } ) ;
46
+ var withs = _uniqueWithFinderService . GetUniqueWiths ( node , new List < Node > ( ) { node , secondNode } , false ) ;
47
47
Assert . AreEqual ( 1 , withs . Withs . Count ) ;
48
48
Assert . AreEqual ( AttributeTags . Package , withs . Withs . First ( ) ) ;
49
49
}
@@ -54,7 +54,7 @@ public void GetOptimalWith_WhenOnlyHavingSameResourceIdAndPackageAsTwoOther_Shou
54
54
var node = new Node ( new XElement ( "node" , new XAttribute ( "resource-id" , "test" ) , new XAttribute ( "package" , "test" ) ) , null ) ;
55
55
var secondNode = new Node ( new XElement ( "node" , new XAttribute ( "resource-id" , "test" ) ) , null ) ;
56
56
var thirdNode = new Node ( new XElement ( "node" , new XAttribute ( "package" , "test" ) ) , null ) ;
57
- var withs = _uniqueWithFinderService . GetUniqueWiths ( node , new List < Node > ( ) { node , secondNode , thirdNode } ) ;
57
+ var withs = _uniqueWithFinderService . GetUniqueWiths ( node , new List < Node > ( ) { node , secondNode , thirdNode } , false ) ;
58
58
Assert . AreEqual ( 2 , withs . Withs . Count ) ;
59
59
Assert . AreEqual ( AttributeTags . ResourceId , withs . Withs . First ( ) ) ;
60
60
Assert . AreEqual ( AttributeTags . Package , withs . Withs . Last ( ) ) ;
@@ -68,7 +68,7 @@ public void GetOptimalWith_WhenNoUniqueValuesAndHaveToUseParent_ShouldGetParent(
68
68
parent . Children . Add ( node ) ;
69
69
var secondNode = new Node ( new XElement ( "node" , new XAttribute ( "package" , "test" ) , new XAttribute ( "resource-id" , "test" ) ) , null ) ;
70
70
var thirdNode = new Node ( new XElement ( "node" , new XAttribute ( "resource-id" , "test" ) , new XAttribute ( "package" , "test" ) ) , null ) ;
71
- var withs = _uniqueWithFinderService . GetUniqueWiths ( node , new List < Node > ( ) { node , secondNode , thirdNode , parent } ) ;
71
+ var withs = _uniqueWithFinderService . GetUniqueWiths ( node , new List < Node > ( ) { node , secondNode , thirdNode , parent } , false ) ;
72
72
Assert . AreEqual ( 1 , withs . Withs . Count ) ;
73
73
Assert . IsNotNull ( withs . Parent ) ;
74
74
Assert . AreEqual ( AttributeTags . ResourceId , withs . Withs . First ( ) ) ;
@@ -84,7 +84,7 @@ public void GetOptimalWith_WhenNoUniqueValuesAndHaveToUseParentAndParentsOtherCh
84
84
parent . Children . Add ( otherChildNode ) ;
85
85
var secondNode = new Node ( new XElement ( "node" , new XAttribute ( "package" , "test" ) , new XAttribute ( "resource-id" , "test" ) ) , null ) ;
86
86
var thirdNode = new Node ( new XElement ( "node" , new XAttribute ( "resource-id" , "test" ) , new XAttribute ( "package" , "test" ) ) , null ) ;
87
- var withs = _uniqueWithFinderService . GetUniqueWiths ( node , new List < Node > ( ) { node , secondNode , thirdNode , parent , otherChildNode } ) ;
87
+ var withs = _uniqueWithFinderService . GetUniqueWiths ( node , new List < Node > ( ) { node , secondNode , thirdNode , parent , otherChildNode } , false ) ;
88
88
Assert . AreEqual ( 1 , withs . Withs . Count ) ;
89
89
Assert . IsNotNull ( withs . Parent ) ;
90
90
Assert . AreEqual ( AttributeTags . Package , withs . Withs . First ( ) ) ;
0 commit comments