<commit_before>package org.testeditor.tml.dsl.tests.formatter

import org.junit.Test

class TmlModelFormatterTest extends AbstractTmlFormatterTest {

	@Test
	def void formatLineBreaks() {
		formatterTester.assertFormatted [
			expectation = '''
				package com.example
				
				import a.b.c
				import c.d.e
				
				# MacroCollection
				
				## SomeMacro
				template = "do this" ${element} "and that" ${var}
				Component: some
				- step withspaces "string" with <ele> and @some.
				- next step
				
				## OtherMacro
				template = "ok" ${element}
				Macro: MacroCollection
				- dos this @element and "some" that @element
			'''

			toBeFormatted = '''
				package com.example	import a.b.c
				import c.d.e
				#
				MacroCollection
				##
				SomeMacro
				template
				=
				"do this"
				${element}
				"and that"
				${var}
				Component
				:
				some
				-
				step
				withspaces
				"string"
				with
				<ele>
				and
				@
				some
				.
				-
				next
				step
				##
				OtherMacro
				template
				=
				"ok"
				${element}
				Macro
				:
				MacroCollection
				-
				dos
				this
				@
				element
				and
				"some"
				that
				@
				element
			'''
		]
	}

	@Test
	def void formatWhitespaces() {
		formatterTester.assertFormatted [
			expectation = '''
				package com.example
				
				import a.b.c
				import c.d.e
				
				# MacroCollection
				
				## SomeMacro
				template = "do this" ${element} "and that" ${var}
				Component: some
				- step withspaces "string" with <ele> and @some.
				- next step
				
				## OtherMacro
				template = "ok" ${element}
				Macro: MacroCollection
				- dos this @element and "some" that @element
			'''

			toBeFormatted = '''
				package com.example	import a.b.c
				import c.d.e 
				    #    MacroCollection   ##    SomeMacro   template 	= 	  "do this" 
				    ${element} 	  "and that" 	  ${var}	  	Component      :     some    -
				     step     withspaces        "string"       with
				      <ele>    and    @  some          .			-next     
				         step 	 ##OtherMacro		template = "ok" ${element}    Macro   
				         :   MacroCollection  	- dos
				   this    @    element     and    "some"    that    @element
			'''
		]
	}
}
<commit_msg>TE-388 removed redundant tests<commit_after>package org.testeditor.tml.dsl.tests.formatter

import org.junit.Test

class TmlModelFormatterTest extends AbstractTmlFormatterTest {

	@Test
	def void formatLineBreaks() {
		formatterTester.assertFormatted [
			expectation = '''
				package com.example
				
				import a.b.c
				import c.d.e
				
				# MacroCollection
				
			'''

			toBeFormatted = '''
				package com.example	import a.b.c
				import c.d.e
				#
				MacroCollection
			'''
		]
	}

	@Test
	def void formatWhitespaces() {
		formatterTester.assertFormatted [
			expectation = '''
				package com.example
				
				import a.b.c
				import c.d.e
				
				# MacroCollection
				
			'''

			toBeFormatted = '''
				package com.example	import a.b.c
				import c.d.e 
				    #    MacroCollection
			'''
		]
	}
}

{'fraction_non_alphanumeric': 0.09915474642392717, 'fraction_numerical': 0.0009752925877763329, 'mean_word_length': 1.7134038800705467, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3756825', 'n_tokens_mistral': 1452, 'n_tokens_neox': 999, 'n_words': 231}