Created
September 29, 2010 20:23
-
-
Save nylen/603472 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Set list of models for next steps | |
switch (Wizard.TestingMode) { | |
case TestingMode.Run: | |
Wizard.Models = newModels.Keys.ToDictionary( | |
m => m, | |
x => dummyArray); | |
break; | |
case TestingMode.RunAndCompare: | |
Wizard.Models = newModels.Keys.ToDictionary( | |
m => m, | |
m => (oldTestSet.ContainsModel(m) | |
? oldTestSet[m].Intersect(newTestSet[m]).ToArray() | |
: dummyArray)); | |
break; | |
case TestingMode.ViewPreviousResults: | |
// Right now all models are included, even if | |
// they don't have any associated comparison results. | |
Wizard.Models = oldModels.Keys.ToDictionary( | |
m => m, | |
m => oldTestSet[m].Where( | |
o => oldTestSet.OutputFileHasResults(o)).ToArray()); | |
break; | |
case TestingMode.Compare: | |
Wizard.Models = oldModels.Keys | |
.Intersect(newModels.Keys).ToDictionary( | |
m => m, | |
m => oldTestSet[m].Intersect(newTestSet[m]).ToArray()) | |
.Where(entry => entry.Value.Length > 0) | |
.ToDictionary( | |
entry => entry.Key, | |
entry => entry.Value); | |
break; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment