Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,11 @@ public bool SessionStarted(SessionStartEventArgs sessionStartEventArgs)
return false;
}

TPDebug.Assert(_dataCollectionEnvironmentContext is not null, "_dataCollectionEnvironmentContext is null");
if (_dataCollectionEnvironmentContext is null)
{
throw new InvalidOperationException(Resources.Resources.DataCollectionContextNotInitialized);
}

sessionStartEventArgs.Context = new DataCollectionContext(_dataCollectionEnvironmentContext.SessionDataCollectionContext.SessionId);
SendEvent(sessionStartEventArgs);

Expand All @@ -316,8 +320,16 @@ public void TestCaseStarted(TestCaseStartEventArgs testCaseStartEventArgs)
return;
}

TPDebug.Assert(_dataCollectionEnvironmentContext is not null, "_dataCollectionEnvironmentContext is null");
TPDebug.Assert(testCaseStartEventArgs.TestElement is not null, "testCaseStartEventArgs.TestElement is null");
if (_dataCollectionEnvironmentContext is null)
{
throw new InvalidOperationException(Resources.Resources.DataCollectionContextNotInitialized);
}

if (testCaseStartEventArgs.TestElement is null)
{
throw new InvalidOperationException(Resources.Resources.DataCollectionTestCaseStartMissingTestElement);
}
Comment on lines +328 to +331

var context = new DataCollectionContext(_dataCollectionEnvironmentContext.SessionDataCollectionContext.SessionId, testCaseStartEventArgs.TestElement);
testCaseStartEventArgs.Context = context;

Expand All @@ -332,8 +344,16 @@ public Collection<AttachmentSet> TestCaseEnded(TestCaseEndEventArgs testCaseEndE
return new Collection<AttachmentSet>();
}

TPDebug.Assert(_dataCollectionEnvironmentContext is not null, "_dataCollectionEnvironmentContext is null");
TPDebug.Assert(testCaseEndEventArgs.TestElement is not null, "testCaseEndEventArgs.TestElement is null");
if (_dataCollectionEnvironmentContext is null)
{
throw new InvalidOperationException(Resources.Resources.DataCollectionContextNotInitialized);
}

if (testCaseEndEventArgs.TestElement is null)
{
throw new InvalidOperationException(Resources.Resources.DataCollectionTestCaseEndMissingTestElement);
}

var context = new DataCollectionContext(_dataCollectionEnvironmentContext.SessionDataCollectionContext.SessionId, testCaseEndEventArgs.TestElement);
testCaseEndEventArgs.Context = context;

Expand Down
27 changes: 27 additions & 0 deletions src/Microsoft.TestPlatform.Common/Resources/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions src/Microsoft.TestPlatform.Common/Resources/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,15 @@
<data name="DataCollectorRequestedDuplicateEnvironmentVariable" xml:space="preserve">
<value>The data collector '{0}' requested environment variable '{1}' with value '{2}' to be set in test execution environment, but another data collector '{3}' has already requested same environment variable with different value '{4}'.</value>
</data>
<data name="DataCollectionContextNotInitialized" xml:space="preserve">
<value>The data collection environment context has not been initialized. Ensure that session started before processing test case events.</value>
</data>
<data name="DataCollectionTestCaseStartMissingTestElement" xml:space="preserve">
<value>TestCaseStartEventArgs.TestElement is null. The data collector cannot start a test case without a test element.</value>
</data>
<data name="DataCollectionTestCaseEndMissingTestElement" xml:space="preserve">
<value>TestCaseEndEventArgs.TestElement is null. The data collector cannot end a test case without a test element.</value>
</data>
<data name="DuplicateExtensionUri" xml:space="preserve">
<value>Duplicate test extension URI '{0}'. Ignoring the duplicate extension.</value>
</data>
Expand Down
15 changes: 15 additions & 0 deletions src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,21 @@
<target state="translated">Nepovedlo se najรญt kolekci dat {0}.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectionContextNotInitialized">
<source>The data collection environment context has not been initialized. Ensure that session started before processing test case events.</source>
<target state="new">The data collection environment context has not been initialized. Ensure that session started before processing test case events.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectionTestCaseEndMissingTestElement">
<source>TestCaseEndEventArgs.TestElement is null. The data collector cannot end a test case without a test element.</source>
<target state="new">TestCaseEndEventArgs.TestElement is null. The data collector cannot end a test case without a test element.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectionTestCaseStartMissingTestElement">
<source>TestCaseStartEventArgs.TestElement is null. The data collector cannot start a test case without a test element.</source>
<target state="new">TestCaseStartEventArgs.TestElement is null. The data collector cannot start a test case without a test element.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectorRequestedDuplicateEnvironmentVariable">
<source>The data collector '{0}' requested environment variable '{1}' with value '{2}' to be set in test execution environment, but another data collector '{3}' has already requested same environment variable with different value '{4}'.</source>
<target state="translated">Kolekce dat {0} si v prostล™edรญ provedenรญ testu vyลพรกdala nastavenรญ promฤ›nnรฉ prostล™edรญ {1} na hodnotu {2}, ale jinรก kolekce dat {3} si uลพ vyลพรกdala stejnou promฤ›nnou prostล™edรญ s rozdรญlnou hodnotou {4}.</target>
Expand Down
15 changes: 15 additions & 0 deletions src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,21 @@
<target state="translated">Datensammler "{0}" wurde nicht gefunden</target>
<note />
</trans-unit>
<trans-unit id="DataCollectionContextNotInitialized">
<source>The data collection environment context has not been initialized. Ensure that session started before processing test case events.</source>
<target state="new">The data collection environment context has not been initialized. Ensure that session started before processing test case events.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectionTestCaseEndMissingTestElement">
<source>TestCaseEndEventArgs.TestElement is null. The data collector cannot end a test case without a test element.</source>
<target state="new">TestCaseEndEventArgs.TestElement is null. The data collector cannot end a test case without a test element.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectionTestCaseStartMissingTestElement">
<source>TestCaseStartEventArgs.TestElement is null. The data collector cannot start a test case without a test element.</source>
<target state="new">TestCaseStartEventArgs.TestElement is null. The data collector cannot start a test case without a test element.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectorRequestedDuplicateEnvironmentVariable">
<source>The data collector '{0}' requested environment variable '{1}' with value '{2}' to be set in test execution environment, but another data collector '{3}' has already requested same environment variable with different value '{4}'.</source>
<target state="translated">Der Datensammler "{0}" hat das Festlegen der Umgebungsvariablen "{1}" mit dem Wert "{2}" in der Testausfรผhrungsumgebung angefordert, ein anderer Datensammler "{3}" hat jedoch die gleiche Umgebungsvariable mit dem anderen Wert "{4}" angefordert.</target>
Expand Down
15 changes: 15 additions & 0 deletions src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,21 @@
<target state="translated">No se pudo encontrar el recopilador de datos "{0}"</target>
<note />
</trans-unit>
<trans-unit id="DataCollectionContextNotInitialized">
<source>The data collection environment context has not been initialized. Ensure that session started before processing test case events.</source>
<target state="new">The data collection environment context has not been initialized. Ensure that session started before processing test case events.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectionTestCaseEndMissingTestElement">
<source>TestCaseEndEventArgs.TestElement is null. The data collector cannot end a test case without a test element.</source>
<target state="new">TestCaseEndEventArgs.TestElement is null. The data collector cannot end a test case without a test element.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectionTestCaseStartMissingTestElement">
<source>TestCaseStartEventArgs.TestElement is null. The data collector cannot start a test case without a test element.</source>
<target state="new">TestCaseStartEventArgs.TestElement is null. The data collector cannot start a test case without a test element.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectorRequestedDuplicateEnvironmentVariable">
<source>The data collector '{0}' requested environment variable '{1}' with value '{2}' to be set in test execution environment, but another data collector '{3}' has already requested same environment variable with different value '{4}'.</source>
<target state="translated">El recopilador de datos "{0}" solicitรณ que la variable de entorno "{1}" con el valor "{2}" se estableciera en el entorno de ejecuciรณn de pruebas, pero otro recopilador de datos "{3}" ya ha solicitado la misma variable de entorno con otro valor "{4}".</target>
Expand Down
15 changes: 15 additions & 0 deletions src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,21 @@
<target state="translated">Collecteur de donnรฉes '{0}' introuvable</target>
<note />
</trans-unit>
<trans-unit id="DataCollectionContextNotInitialized">
<source>The data collection environment context has not been initialized. Ensure that session started before processing test case events.</source>
<target state="new">The data collection environment context has not been initialized. Ensure that session started before processing test case events.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectionTestCaseEndMissingTestElement">
<source>TestCaseEndEventArgs.TestElement is null. The data collector cannot end a test case without a test element.</source>
<target state="new">TestCaseEndEventArgs.TestElement is null. The data collector cannot end a test case without a test element.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectionTestCaseStartMissingTestElement">
<source>TestCaseStartEventArgs.TestElement is null. The data collector cannot start a test case without a test element.</source>
<target state="new">TestCaseStartEventArgs.TestElement is null. The data collector cannot start a test case without a test element.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectorRequestedDuplicateEnvironmentVariable">
<source>The data collector '{0}' requested environment variable '{1}' with value '{2}' to be set in test execution environment, but another data collector '{3}' has already requested same environment variable with different value '{4}'.</source>
<target state="translated">Le collecteur de donnรฉes '{0}' exige que la variable d'environnement '{1}' avec la valeur '{2}' soit dรฉfinie dans un environnement d'exรฉcution de test, mais un autre collecteur de donnรฉes '{3}' a dรฉjร  exigรฉ la mรชme variable d'environnement avec une autre valeur '{4}'.</target>
Expand Down
15 changes: 15 additions & 0 deletions src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.it.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,21 @@
<target state="translated">L'agente di raccolta dati '{0}' non รจ stato trovato</target>
<note />
</trans-unit>
<trans-unit id="DataCollectionContextNotInitialized">
<source>The data collection environment context has not been initialized. Ensure that session started before processing test case events.</source>
<target state="new">The data collection environment context has not been initialized. Ensure that session started before processing test case events.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectionTestCaseEndMissingTestElement">
<source>TestCaseEndEventArgs.TestElement is null. The data collector cannot end a test case without a test element.</source>
<target state="new">TestCaseEndEventArgs.TestElement is null. The data collector cannot end a test case without a test element.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectionTestCaseStartMissingTestElement">
<source>TestCaseStartEventArgs.TestElement is null. The data collector cannot start a test case without a test element.</source>
<target state="new">TestCaseStartEventArgs.TestElement is null. The data collector cannot start a test case without a test element.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectorRequestedDuplicateEnvironmentVariable">
<source>The data collector '{0}' requested environment variable '{1}' with value '{2}' to be set in test execution environment, but another data collector '{3}' has already requested same environment variable with different value '{4}'.</source>
<target state="translated">L'agente di raccolta dati '{0}' ha richiesto che la variabile di ambiente '{1}' con valore '{2}' fosse impostata nell'ambiente di esecuzione dei test, ma un altro agente di raccolta dati '{3}' ha giร  richiesto la stessa variabile di ambiente con un valore diverso '{4}'.</target>
Expand Down
15 changes: 15 additions & 0 deletions src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.ja.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,21 @@
<target state="translated">ใƒ‡ใƒผใ‚ฟ ใ‚ณใƒฌใ‚ฏใ‚ฟใƒผ '{0}' ใŒ่ฆ‹ใคใ‹ใ‚Šใพใ›ใ‚“ใงใ—ใŸ</target>
<note />
</trans-unit>
<trans-unit id="DataCollectionContextNotInitialized">
<source>The data collection environment context has not been initialized. Ensure that session started before processing test case events.</source>
<target state="new">The data collection environment context has not been initialized. Ensure that session started before processing test case events.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectionTestCaseEndMissingTestElement">
<source>TestCaseEndEventArgs.TestElement is null. The data collector cannot end a test case without a test element.</source>
<target state="new">TestCaseEndEventArgs.TestElement is null. The data collector cannot end a test case without a test element.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectionTestCaseStartMissingTestElement">
<source>TestCaseStartEventArgs.TestElement is null. The data collector cannot start a test case without a test element.</source>
<target state="new">TestCaseStartEventArgs.TestElement is null. The data collector cannot start a test case without a test element.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectorRequestedDuplicateEnvironmentVariable">
<source>The data collector '{0}' requested environment variable '{1}' with value '{2}' to be set in test execution environment, but another data collector '{3}' has already requested same environment variable with different value '{4}'.</source>
<target state="translated">ใƒ‡ใƒผใ‚ฟ ใ‚ณใƒฌใ‚ฏใ‚ฟใƒผ '{0}' ใŒๅ€ค '{2}' ใฎ็’ฐๅขƒๅค‰ๆ•ฐ '{1}' ใ‚’ใƒ†ใ‚นใƒˆๅฎŸ่กŒๆ™‚็’ฐๅขƒใง่จญๅฎšใ™ใ‚‹ใ‚ˆใ†ใซ่ฆๆฑ‚ใ—ใพใ—ใŸใŒใ€ๅˆฅใฎใƒ‡ใƒผใ‚ฟ ใ‚ณใƒฌใ‚ฏใ‚ฟใƒผ '{3}' ใŒๆ—ขใซๅˆฅใฎๅ€ค '{4}' ใ‚’ๆŒใคๅŒใ˜็’ฐๅขƒๅค‰ๆ•ฐใ‚’่ฆๆฑ‚ใ—ใฆใ„ใพใ™ใ€‚</target>
Expand Down
15 changes: 15 additions & 0 deletions src/Microsoft.TestPlatform.Common/Resources/xlf/Resources.ko.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,21 @@
<target state="translated">๋ฐ์ดํ„ฐ ์ˆ˜์ง‘๊ธฐ '{0}'์„(๋ฅผ) ์ฐพ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectionContextNotInitialized">
<source>The data collection environment context has not been initialized. Ensure that session started before processing test case events.</source>
<target state="new">The data collection environment context has not been initialized. Ensure that session started before processing test case events.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectionTestCaseEndMissingTestElement">
<source>TestCaseEndEventArgs.TestElement is null. The data collector cannot end a test case without a test element.</source>
<target state="new">TestCaseEndEventArgs.TestElement is null. The data collector cannot end a test case without a test element.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectionTestCaseStartMissingTestElement">
<source>TestCaseStartEventArgs.TestElement is null. The data collector cannot start a test case without a test element.</source>
<target state="new">TestCaseStartEventArgs.TestElement is null. The data collector cannot start a test case without a test element.</target>
<note />
</trans-unit>
<trans-unit id="DataCollectorRequestedDuplicateEnvironmentVariable">
<source>The data collector '{0}' requested environment variable '{1}' with value '{2}' to be set in test execution environment, but another data collector '{3}' has already requested same environment variable with different value '{4}'.</source>
<target state="translated">๋ฐ์ดํ„ฐ ์ˆ˜์ง‘๊ธฐ '{0}'์—์„œ ๊ฐ’์ด '{2}'์ธ ํ™˜๊ฒฝ ๋ณ€์ˆ˜ '{1}'์„(๋ฅผ) ํ…Œ์ŠคํŠธ ์‹คํ–‰ ํ™˜๊ฒฝ์—์„œ ์„ค์ •ํ•˜๋„๋ก ์š”์ฒญํ–ˆ๋Š”๋ฐ, ๋‹ค๋ฅธ ๋ฐ์ดํ„ฐ ์ˆ˜์ง‘๊ธฐ '{3}'์ด(๊ฐ€) ๋‹ค๋ฅธ ๊ฐ’('{4}')์„ ํฌํ•จํ•˜๋Š” ๋™์ผ ํ™˜๊ฒฝ ๋ณ€์ˆ˜๋ฅผ ์ด๋ฏธ ์š”์ฒญํ–ˆ์Šต๋‹ˆ๋‹ค.</target>
Expand Down
Loading