public void Select_returns_last_service_for_language() { var expected = new TestModelCodeGenerator("C#"); var selector = new ModelCodeGeneratorSelector( new[] { new TestModelCodeGenerator("C#"), expected }); var result = selector.Select( new ModelCodeGenerationOptions { Language = "C#" }); Assert.Same(expected, result); }
public void Select_returns_last_service_for_language_when_no_templates() { var expected = new TestModelCodeGenerator("C#"); var selector = new ModelCodeGeneratorSelector( new IModelCodeGenerator[] { new TestTemplatedModelGenerator(hasTemplates: false), new TestModelCodeGenerator("C#"), expected }); var result = selector.Select( new ModelCodeGenerationOptions { Language = "C#" }); Assert.Same(expected, result); }