<commit_before>package com.seleniumtests.ut.core.config.mobile;

import org.openqa.selenium.By;
import org.testng.Assert;
import org.testng.ITestContext;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import org.testng.xml.XmlTest;

import com.seleniumtests.core.Locator;
import com.seleniumtests.core.SeleniumTestsContextManager;
import com.seleniumtests.webelements.InterceptBy;


public class TestConfigMobileIntercepter {
	@BeforeMethod(enabled=true, alwaysRun = true)
	public void initContext(final ITestContext testNGCtx, final XmlTest xmlTest) {
		InterceptBy.setPage("TestConfigMobileIntercepter");
		SeleniumTestsContextManager.initThreadContext(testNGCtx, xmlTest);
	}
	
	@Test(groups={"ut"})
	public void interceptBy() {
		Assert.assertEquals(By.id("map:id").toString(), "By.id: login", "intercept by with map doesn't work");
	}

	@Test(groups={"ut"})
	public void interceptByLocator() {
		Assert.assertEquals(Locator.locateById("map:id").toString(), "By.id: login", "intercept by Locator doesn't work");
	}
	
	@Test(groups={"ut"})
	public void noChangeBy() {
		Assert.assertEquals(By.id("id").toString(), "By.id: id", "no change when no key word doesn't work");
	}
	
	@Test(groups={"ut"})
	public void noModifWhenNoPresence() {
		Assert.assertEquals(By.id("map:name").toString(), "By.id: map:name", "no change when not present doesn't work");
	}

}<commit_msg>correction unit test mapping noModifWhenNoPresence now exceptionWhenNoPresence<commit_after>package com.seleniumtests.ut.core.config.mobile;

import org.openqa.selenium.By;
import org.testng.Assert;
import org.testng.ITestContext;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import org.testng.xml.XmlTest;

import com.seleniumtests.core.Locator;
import com.seleniumtests.core.SeleniumTestsContextManager;
import com.seleniumtests.customexception.ConfigurationException;
import com.seleniumtests.webelements.InterceptBy;


public class TestConfigMobileIntercepter {
	@BeforeMethod(enabled=true, alwaysRun = true)
	public void initContext(final ITestContext testNGCtx, final XmlTest xmlTest) {
		InterceptBy.setPage("TestConfigMobileIntercepter");
		SeleniumTestsContextManager.initThreadContext(testNGCtx, xmlTest);
	}
	
	@Test(groups={"ut"})
	public void interceptBy() {
		Assert.assertEquals(By.id("map:id").toString(), "By.id: login", "intercept by with map doesn't work");
	}

	@Test(groups={"ut"})
	public void interceptByLocator() {
		Assert.assertEquals(Locator.locateById("map:id").toString(), "By.id: login", "intercept by Locator doesn't work");
	}
	
	@Test(groups={"ut"})
	public void noChangeBy() {
		Assert.assertEquals(By.id("id").toString(), "By.id: id", "no change when no key word doesn't work");
	}
	
	@Test(groups={"ut"}, expectedExceptions = ConfigurationException.class)
	public void exceptionWhenNoPresence() {
		By.id("map:name");
	}

}
{'fraction_non_alphanumeric': 0.13694377371507416, 'fraction_numerical': 0.0, 'mean_word_length': 6.552083333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, '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': '1797590', 'n_tokens_mistral': 994, 'n_tokens_neox': 931, 'n_words': 183}