Ejemplo n.º 1
0
		private static void TestParseCore( char quotation, string name, string value, Action<SvcDirectiveParserState> assertion )
		{
			SvcDirectiveParserState target = new AttributeValueParsingState( GetPrevious(), name, quotation, new StringBuilder() );
			var reader = new StringReader( value + quotation );
			target = target.Parse( reader );
			Assert.That( target, Is.TypeOf<AttributeNameParsingState>() );
			assertion( target );
		}
Ejemplo n.º 2
0
		public AttributeNameParsingState( AttributeValueParsingState previous, StringBuilder buffer ) : base( previous, buffer ) { }
Ejemplo n.º 3
0
		public void TestParse_NoEndQuot_Fail()
		{
			var quotation = '"';
			var name = "Service";
			var value = "Example.Service";
			SvcDirectiveParserState target = new AttributeValueParsingState( GetPrevious(), name, quotation, new StringBuilder() );
			var reader = new StringReader( value );
			target = target.Parse( reader );
		}
Ejemplo n.º 4
0
		public void TestParse_SingleQuoteOneCharAndDoubleQuote_NameWasService_TransitToAttributeNameParsingStateWithDirectiveSet()
		{
			var quotation = '\'';
			var name = "Service";
			var value = "Example.Service";
			SvcDirectiveParserState target = new AttributeValueParsingState( GetPrevious(), name, quotation, new StringBuilder() );
			var reader = new StringReader( value + '"' );
			target = target.Parse( reader );
		}