Skip to content

Commit fbdd459

Browse files
committed
(#1337) Add tests
1 parent 7e6bbc7 commit fbdd459

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

src/Tests/Lanceur.Tests/ViewModels/DataReconciliationViewModelTest.cs

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,46 @@ private static IEnumerable<object[]> DoubloonCriteriaSource()
101101
.WithLuaScript("return version_b")
102102
.WithSynonyms("a2"))
103103
];
104+
yield return
105+
[
106+
"Two hidden Steam aliases with same file_name — should be doubloons",
107+
2,
108+
new SqlBuilder()
109+
.AppendAlias(a =>
110+
a.WithFileName("steam://rungameid/440")
111+
.WithHiddenFlag()
112+
.WithSynonyms("half-life-2-a"))
113+
.AppendAlias(a =>
114+
a.WithFileName("steam://rungameid/440")
115+
.WithHiddenFlag()
116+
.WithSynonyms("half-life-2-b"))
117+
];
118+
yield return
119+
[
120+
"Two hidden Steam aliases with different file_names — should NOT be doubloons",
121+
0,
122+
new SqlBuilder()
123+
.AppendAlias(a =>
124+
a.WithFileName("steam://rungameid/440")
125+
.WithHiddenFlag()
126+
.WithSynonyms("half-life-2"))
127+
.AppendAlias(a =>
128+
a.WithFileName("steam://rungameid/730")
129+
.WithHiddenFlag()
130+
.WithSynonyms("counter-strike-2"))
131+
];
132+
yield return
133+
[
134+
"Two non-hidden Steam aliases with same file_name — should be doubloons",
135+
2,
136+
new SqlBuilder()
137+
.AppendAlias(a =>
138+
a.WithFileName("steam://rungameid/440")
139+
.WithSynonyms("half-life-2-a"))
140+
.AppendAlias(a =>
141+
a.WithFileName("steam://rungameid/440")
142+
.WithSynonyms("half-life-2-b"))
143+
];
104144
}
105145

106146
private static IEnumerable<object[]> ShowInactiveAliasesSource()

0 commit comments

Comments
 (0)