public void Messages_Values_ExtractedFromConversionErrors()
		{
			MetadataConversionError error1 = new MetadataConversionError("Message1");
			MetadataConversionError error2 = new MetadataConversionError("Message2");
			List<MetadataConversionError> conversionErrors = new List<MetadataConversionError>{error1, error2};
			CodeGenerationException exception = new CodeGenerationException(conversionErrors);

			Assert.That(exception.Messages, Has.Count.EqualTo(2));
			Assert.That(exception.Messages, Has.Member("Message1"));
			Assert.That(exception.Messages, Has.Member("Message2"));
		}
Exemplo n.º 2
0
        public void MessagesPropertyContainsErrorsProvidedToConstructor()
        {
            MetadataConversionError        error1           = new MetadataConversionError("Message1");
            MetadataConversionError        error2           = new MetadataConversionError("Message2");
            List <MetadataConversionError> conversionErrors = new List <MetadataConversionError> {
                error1, error2
            };
            CodeGenerationException exception = new CodeGenerationException(conversionErrors);

            Assert.That(exception.Messages, Has.Count.EqualTo(2));
            Assert.That(exception.Messages, Has.Member("Message1"));
            Assert.That(exception.Messages, Has.Member("Message2"));
        }