<commit_before>package org.nasdanika.core.tests;

import static org.junit.Assert.*;

import org.junit.Test;
import org.nasdanika.core.CommandMethod;
import org.nasdanika.core.Context;
import org.nasdanika.core.ReflectiveCommandSource;

public class ReflectiveCommandSourceTest {
	
	public static class ReflectiveCommandSourceTestImpl extends ReflectiveCommandSource {

		public ReflectiveCommandSourceTestImpl() throws Exception {
			super();
		}
		
		@CommandMethod
		public String testCommandMethod(Context context) {
			return "OK";
		}
		
	}

	@Test
	public void testReflectiveCommandSource() throws Exception {
		try (ReflectiveCommandSource cs = new ReflectiveCommandSourceTestImpl()) {
			assertEquals(1, cs.getCommandMap().size());
			assertTrue(cs.getCommandMap().containsKey("testCommandMethod"));
			assertEquals("OK",cs.getCommandMap().get("testCommandMethod").execute(null));
		}
	}

}<commit_msg>Ongoing enhancements.<commit_after>package org.nasdanika.core.tests;

import static org.junit.Assert.*;

import org.junit.Test;
import org.nasdanika.core.CommandMethod;
import org.nasdanika.core.Context;
import org.nasdanika.core.ReflectiveCommandProvider;

public class ReflectiveCommandSourceTest {
	
	public static class ReflectiveCommandSourceTestImpl extends ReflectiveCommandProvider {

		public ReflectiveCommandSourceTestImpl() throws Exception {
			super();
		}
		
		@CommandMethod
		public String testCommandMethod(Context context) {
			return "OK";
		}
		
	}

	@Test
	public void testReflectiveCommandSource() throws Exception {
		try (ReflectiveCommandProvider cs = new ReflectiveCommandSourceTestImpl()) {
			assertEquals(1, cs.getCommandMap().size());
			assertTrue(cs.getCommandMap().containsKey("testCommandMethod"));
			assertEquals("OK",cs.getCommandMap().get("testCommandMethod").execute(null));
		}
	}

}
{'fraction_non_alphanumeric': 0.10523446019629226, 'fraction_numerical': 0.0010905125408942203, 'mean_word_length': 5.821561338289963, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3025004', 'n_tokens_mistral': 580, 'n_tokens_neox': 527, 'n_words': 99}