public void ShouldGetAssemblyReferences() { string message = "Hello World"; ExtensibleMockModelElement myModelElement = new ExtensibleMockModelElement(partition, message); ProjectNode project = GetTestProjectNode(); AssemblyReferencesArtifactLink link = new AssemblyReferencesArtifactLink(myModelElement); Utility.SetData <IServiceProvider>(link, new MockServiceProvider()); Utility.SetData <ProjectNode>(link, project); TextTemplateCodeGenerationStrategy strategy = new TextTemplateCodeGenerationStrategy(); strategy.ResourceResolver = link; strategy.Generate(link); Assert.AreEqual <int>(2, strategy.AssemblyReferences.Count); }
public void ShouldGetAssemblyReferences() { string message = "Hello World"; ExtensibleMockModelElement myModelElement = new ExtensibleMockModelElement(partition, message); ProjectNode project = GetTestProjectNode(); AssemblyReferencesArtifactLink link = new AssemblyReferencesArtifactLink(myModelElement); Utility.SetData<IServiceProvider>(link, new MockServiceProvider()); Utility.SetData<ProjectNode>(link, project); TextTemplateCodeGenerationStrategy strategy = new TextTemplateCodeGenerationStrategy(); strategy.ResourceResolver = link; strategy.Generate(link); Assert.AreEqual<int>(2, strategy.AssemblyReferences.Count); }