public void CanAddDocumentSpecByType() { PipelineContext context = new PipelineContext(); DocSpecLoader loader = new DocSpecLoader(); context.AddDocSpecByType("spec1", loader.LoadDocSpec(typeof(Schema1_NPP))); Assert.IsNotNull(context.GetDocumentSpecByType("spec1")); }
public void ThrowExceptionIfNoDocSpecFoundByType() { string specType = "non-existant-spec"; try { IPipelineContext context = new PipelineContext(); context.GetDocumentSpecByType(specType); } catch (COMException ex) { Assert.That(ex.Message, new EndsWithConstraint(specType)); } }