<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Talend tAssert component issue in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Talend-tAssert-component-issue/m-p/2211362#M9416</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am currently developping my Unit Test to check my developments.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have an issue with a tAssert component, when I compare 2 integer which came from a tSetGlobalVar component.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have this in my tAssert Expression field :&lt;/P&gt; 
&lt;P&gt;((Integer)globalMap.get("countRows"))==((Integer)globalMap.get("NbMunicipalityExtract"))&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This assertion results always by a "Test logically failed" status.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am 100% sure that I have exactly the same value in the 2 variables, because I have set this in the Description field of my tAssert :&lt;/P&gt; 
&lt;P&gt;"Check current count :&amp;nbsp; " + ((Integer)globalMap.get("countRows")) + " == " + ((Integer)globalMap.get("NbMunicipalityExtract"))&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;And I can see that in the results :&lt;/P&gt; 
&lt;P&gt;Check current count :&amp;nbsp; 382 == 382&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;How can I fix that ?&lt;/P&gt; 
&lt;P&gt;If I do this in the Expression field :&lt;/P&gt; 
&lt;P&gt;((Integer)globalMap.get("countRows"))==382&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;or&lt;BR /&gt;382==((Integer)globalMap.get("NbMunicipalityExtract")),&lt;/P&gt; 
&lt;P&gt;then the result of the assertion is OK.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Is that an issue with the component ?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I use Talend ESB 7.0.1.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks for your help !&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 07:07:42 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T07:07:42Z</dc:date>
    <item>
      <title>Talend tAssert component issue</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-tAssert-component-issue/m-p/2211362#M9416</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am currently developping my Unit Test to check my developments.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have an issue with a tAssert component, when I compare 2 integer which came from a tSetGlobalVar component.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have this in my tAssert Expression field :&lt;/P&gt; 
&lt;P&gt;((Integer)globalMap.get("countRows"))==((Integer)globalMap.get("NbMunicipalityExtract"))&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This assertion results always by a "Test logically failed" status.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am 100% sure that I have exactly the same value in the 2 variables, because I have set this in the Description field of my tAssert :&lt;/P&gt; 
&lt;P&gt;"Check current count :&amp;nbsp; " + ((Integer)globalMap.get("countRows")) + " == " + ((Integer)globalMap.get("NbMunicipalityExtract"))&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;And I can see that in the results :&lt;/P&gt; 
&lt;P&gt;Check current count :&amp;nbsp; 382 == 382&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;How can I fix that ?&lt;/P&gt; 
&lt;P&gt;If I do this in the Expression field :&lt;/P&gt; 
&lt;P&gt;((Integer)globalMap.get("countRows"))==382&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;or&lt;BR /&gt;382==((Integer)globalMap.get("NbMunicipalityExtract")),&lt;/P&gt; 
&lt;P&gt;then the result of the assertion is OK.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Is that an issue with the component ?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I use Talend ESB 7.0.1.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks for your help !&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 07:07:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-tAssert-component-issue/m-p/2211362#M9416</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T07:07:42Z</dc:date>
    </item>
    <item>
      <title>Re: Talend tAssert component issue</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-tAssert-component-issue/m-p/2211363#M9417</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;there are many similar topics there, the answer is - for compare Integer you can not&amp;nbsp;use ==&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you could use equals() -&amp;nbsp;&lt;A href="https://stackoverflow.com/questions/1514910/how-to-properly-compare-two-integers-in-java" target="_blank" rel="nofollow noopener noreferrer"&gt;https://stackoverflow.com/questions/1514910/how-to-properly-compare-two-integers-in-java&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Dec 2018 09:27:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-tAssert-component-issue/m-p/2211363#M9417</guid>
      <dc:creator>vapukov</dc:creator>
      <dc:date>2018-12-05T09:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Talend tAssert component issue</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Talend-tAssert-component-issue/m-p/2211364#M9418</link>
      <description>&lt;P&gt;Thanks Vapukov for your help !&lt;/P&gt;</description>
      <pubDate>Thu, 06 Dec 2018 06:26:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Talend-tAssert-component-issue/m-p/2211364#M9418</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-06T06:26:29Z</dc:date>
    </item>
  </channel>
</rss>

