public void WhenGettingReferenceWithEmptyElementAssemblyPath_ThenThrows() { var processor = new ModelElementDirectiveProcessor(); CallContext.LogicalSetData(ModelElementDirectiveProcessor.KeyCallContextElementAssemblyPath, ""); Assert.Throws<DirectiveProcessorException>(() => processor.GetReferencesForProcessingRun()); }
public void WhenGettingReferenceWithNonExistingElementAssemblyPath_ThenThrows() { var processor = new ModelElementDirectiveProcessor(); CallContext.LogicalSetData(ModelElementDirectiveProcessor.KeyCallContextElementAssemblyPath, "C:\\Temp\\" + Guid.NewGuid().ToString("X") + ".dll"); Assert.Throws <DirectiveProcessorException>(() => processor.GetReferencesForProcessingRun()); }
public void WhenGettingReferenceWithEmptyElementAssemblyPath_ThenThrows() { var processor = new ModelElementDirectiveProcessor(); CallContext.LogicalSetData(ModelElementDirectiveProcessor.KeyCallContextElementAssemblyPath, ""); Assert.Throws <DirectiveProcessorException>(() => processor.GetReferencesForProcessingRun()); }
public void WhenGettingReferenceAndElementAssemblyPathWasDefined_ThenReturnsDefaultReferencesAndElementReference() { var processor = new ModelElementDirectiveProcessor(); var elementAssemblyPath = Path.GetTempFileName(); CallContext.LogicalSetData(ModelElementDirectiveProcessor.KeyCallContextElementAssemblyPath, elementAssemblyPath); var references = processor.GetReferencesForProcessingRun(); Assert.True(references.Contains(elementAssemblyPath)); }
public void WhenGettingReference_ThenReturnsDefaultReferences() { var processor = new ModelElementDirectiveProcessor(); var elementAssemblyPath = this.GetType().Assembly.ManifestModule.FullyQualifiedName; CallContext.LogicalSetData(ModelElementDirectiveProcessor.KeyCallContextElementAssemblyPath, elementAssemblyPath); var references = processor.GetReferencesForProcessingRun(); Assert.True(references.Contains(typeof(IQueryable).Assembly.Location)); Assert.True(references.Contains(typeof(IVsHierarchy).Assembly.Location)); Assert.True(references.Contains(typeof(ModelElement).Assembly.Location)); Assert.True(references.Contains(typeof(IModelBus).Assembly.Location)); Assert.True(references.Contains(typeof(ModelBusEnabledTextTransformation).Assembly.Location)); }
public void WhenGettingReferenceWithNonExistingElementAssemblyPath_ThenThrows() { var processor = new ModelElementDirectiveProcessor(); CallContext.LogicalSetData(ModelElementDirectiveProcessor.KeyCallContextElementAssemblyPath, "C:\\Temp\\" + Guid.NewGuid().ToString("X") + ".dll"); Assert.Throws<DirectiveProcessorException>(() => processor.GetReferencesForProcessingRun()); }
public void WhenGettingReferenceWithoutElementAssemblyPath_ThenThrows() { var processor = new ModelElementDirectiveProcessor(); Assert.Throws<DirectiveProcessorException>(() => processor.GetReferencesForProcessingRun()); }
public void WhenGettingReferenceWithoutElementAssemblyPath_ThenThrows() { var processor = new ModelElementDirectiveProcessor(); Assert.Throws <DirectiveProcessorException>(() => processor.GetReferencesForProcessingRun()); }