using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AxiomUnitTestProject
{
  public class TestData
  {
    public static List<String> CodeLines()
    {
      List<String> codeLines = new List<String>();
			codeLines.Add("DECLARE A,B;A=1;B=5;WHILE(A<B)A=A+1;");
			codeLines.Add("DECLARE A,B;A=1;B=5;WHILE(A<B){A=A+1;}");
      codeLines.Add("DECLARE R,user_a,user_b,user_c;R=7;user_a=66;user_b=66;user_c=66;IF(R>=5){user_a=1;user_b=1;user_c=1;}");
      codeLines.Add("DECLARE price,operation;operation='OPEN';price=GETPRICE('MIDD','07-12-2021',operation);");
      codeLines.Add("DECLARE var1,var2,var3,var4;var1='Hello';var2=' ';var3='World';var4=UPPER(var1)+UPPER(var2)+UPPER(var3)");
      codeLines.Add("DECLARE var1,var2,var3,var4;var1='2';var2='4';var3='6';var4=CONVERT(var1,'System.Double')+CONVERT(var2,'System.Double')+CONVERT(var3,'System.Double');");
      codeLines.Add("DECLARE var1,var2,var3,var4;var1='2';var2='4';var3='6';var4=CONVERT(var1,'System.Double')*CONVERT(var2,'System.Double')*CONVERT(var3,'System.Double');");
      codeLines.Add("DECLARE var1,var2,var3,var4;var1=-1;var2=-2;var3=-3;var4=abs(var2)*abs(var2)*abs(var2)*abs(var2)*abs(var2)*abs(var2)*abs(var2)*abs(var2)*abs(var2)*abs(var2)*abs(var2)*abs(var2);");
      codeLines.Add("DECLARE var1,var2,var3,var4;var1=1;var2=2;var3=3;var4=var1*var2*var3*var1*var2*var3*abs(var1);");
      codeLines.Add("DECLARE var1,var2,var3,var4;var1=1;var2=2;var3=3;var4=var1*var2*var3*var1*var2*var3;");
      codeLines.Add("DECLARE FIN.Securities.IndustryClass4,FIN.Securities.Country,FIN.Securities.ISIN;FIN.Securities.ISIN='ARARGE';IF(FIN.Securities.ISIN LIKE 'ARARGE'){FIN.Securities.IndustryClass4 = 'Treasury Bond';FIN.Securities.Country='USD'};");
      codeLines.Add("#directive_clear_modified;");
      codeLines.Add("DECLARE ENTITY_ID,EFFECTIVE_DATE;ENTITY_ID=null;IF(ENTITY_ID==null)THEN EFFECTIVE_DATE=CONVERT('1/1/1','System.DateTime');");
      codeLines.Add("DECLARE ENTITY_ID;ENTITY_ID='';IF(ENTITY_ID=='')THEN ENTITY_ID='ENTITY_ID IS BLANK'ELSE ENTITY_ID='ENTITY_ID IS NOT BLANK';");
      codeLines.Add("DECLARE ENTITY_ID,AXIOM_META_TAG;ENTITY_ID=148;IF(ENTITY_ID==148)THEN AXIOM_META_TAG=ENTITY_ID+'_BG' ELSE AXIOM_META_TAG=null;");
      codeLines.Add("DECLARE OAC;OAC=-3.52E-05;");
      codeLines.Add("DECLARE FIN.Analytics.OAD,LAND.STG_EC.SecurityIdentifier;FIN.Analytics.OAD=0.50;LAND.STG_EC.SecurityIdentifier = '397863';IF(LAND.STG_EC.SecurityIdentifier == '397863') THEN FIN.Analytics.OAD = FIN.Analytics.OAD*2.00;");
      codeLines.Add("DECLARE A,B;A=99;if(A<>99)then B=1 else B=2;");
      codeLines.Add("DECLARE A,B,C;A='45';B='2';C=A+B;");    // Ok, concatenation of two strings
      codeLines.Add("DECLARE A,B,C;A='45';B='2';C=A*B;");    // Converts the strings to double and then performs the multiplication
      codeLines.Add("DECLARE A,B,C,D;A='45';B='2';D='2';C=CONVERT(A,'System.Double')*CONVERT(B,'System.Double')*CONVERT(D,'System.Double');");    // Ok, multiplying numerical values
      codeLines.Add("DECLARE A,B,C,D;A='45';B='2';D='2';C=CONVERT(A,'System.Double')*CONVERT(B,'System.Double')*2;");    // Ok, multiplying numerical values
      codeLines.Add("DECLARE A,B,C,D;A='45';B='2';D='2';C=CONVERT(A,'System.Double')+CONVERT(B,'System.Double');");    // Ok, multiplying numerical values
      codeLines.Add("DECLARE A,B,C,D;A='45';B='2';D='2';C=CONVERT(A,'System.Double')+CONVERT(B,'System.Double')+CONVERT(D,'System.Double');");    // Ok, multiplying numerical values
      codeLines.Add("DECLARE RESULT,A,B,C,D;A=CONVERT('01-01-2018','System.DateTime');B=CONVERT('01-02-2018','System.DateTime');IF(A>B) THEN RESULT='01-01-2018 IS GREATER THAN 01-02-2018' ELSE RESULT='01-02-2018 IS GREATER THAN 01-01-2018';");   
      codeLines.Add("DECLARE RESULT,A,B,C,D;A=null;B=null;C='NotNull';RESULT=ISNULL(A,B,C);");   
      codeLines.Add("DECLARE a,b,c;a=100;b=100+a;c=-100;");
      codeLines.Add("DECLARE NOTIONAL,DELTA,DELTA_ADJUSTED_NOTIONAL;NOTIONAL=1000.00;DELTA=.2017;DELTA_ADJUSTED_NOTIONAL=NOTIONAL/DELTA;");
      codeLines.Add("DECLARE NOTIONAL,DELTA,DELTA_ADJUSTED_NOTIONAL;NOTIONAL=20;DELTA=100;DELTA_ADJUSTED_NOTIONAL=NOTIONAL/DELTA;");
      codeLines.Add("DECLARE NOTIONAL,DELTA,DELTA_ADJUSTED_NOTIONAL;NOTIONAL=20.00;if(NOTIONAL==20)then DELTA=.01 else DELTA=1.00;");
      codeLines.Add("DECLARE NOTIONAL,DELTA,DELTA_ADJUSTED_NOTIONAL;NOTIONAL=10.00;if(NOTIONAL<>20) then DELTA=.01 else DELTA=1.00;");
      codeLines.Add("DECLARE NOTIONAL,DELTA,DELTA_ADJUSTED_NOTIONAL;NOTIONAL=20.00;if(2==2)then DELTA=.01 else DELTA=1.00;");
      codeLines.Add("DECLARE NOTIONAL,DELTA,DELTA_ADJUSTED_NOTIONAL;NOTIONAL=20.00;if(3==2)then DELTA=.01 else DELTA=1.00;");
      codeLines.Add("DECLARE NUM1;NUM1=3*4*(2+1)");
      codeLines.Add("DECLARE A,B,C;A=2;B=.5;C=pow(A,B);");
      codeLines.Add("DECLARE A,B,C;A=100;IF(A<200) THEN B=1 ELSE B=0;");
      codeLines.Add("DECLARE A,B,C;A=CONVERT('03-10-2018','System.DateTime');");
      codeLines.Add("DECLARE A,B,C;A=CONVERT('2','System.Int32');B=CONVERT('3','System.Int32');");
      codeLines.Add("DECLARE A,B,C;A=100/50;B=100-(((2*2)*8)*9);");
      codeLines.Add("DECLARE A,B,C;A=abs(-50);");
      codeLines.Add("DECLARE A,B,C;A=abs(-50);");
      codeLines.Add("DECLARE A,B,C;A=99;");
      codeLines.Add("DECLARE A,B,C;A=CONVERT('2','System.Int32');B=CONVERT('2','System.Int32');IF(A==B)THEN C=1 ELSE C=2;");
      codeLines.Add("DECLARE CURRENCY,A;CURRENCY='MXN';A=CURRENCY in('USD','JPY');");
      codeLines.Add("DECLARE CURRENCY,RESULT;CURRENCY='MXN';if(CURRENCY in('USD','JPY','MXN'))THEN RESULT='TRUE' ELSE RESULT='FALSE';");
      codeLines.Add("DECLARE CURRENCY,RESULT;CURRENCY='MXN';if(CURRENCY LIKE '%MXN%') THEN RESULT='TRUE' ELSE RESULT='FALSE';");
      codeLines.Add("DECLARE CURRENCY,START_INDEX,LENGTH,CURRENCY_CODE;CURRENCY='MXN12345';START_INDEX=1;LENGTH=3;CURRENCY_CODE=SUBSTRING(CURRENCY,START_INDEX,LENGTH);");
      codeLines.Add("DECLARE IS_PRIMARY_LEG,SEC_ID,LEG;IS_PRIMARY_LEG='FALSE';SEC_ID='FXF12345678_1';LEG=SUBSTRING(SEC_ID,13,1);IF(LEG==1) THEN IS_PRIMARY_LEG='TRUE' ELSE IS_PRIMARY_LEG='FALSE';");
      codeLines.Add("DECLARE A,B;A=100/50;B=100-(((2*2)*8)*9);");
      codeLines.Add("DECLARE IS_PRIMARY_LEG,SEC_ID;IS_PRIMARY_LEG='FALSE';SEC_ID='FXF12345678_1';IF(SUBSTRING(SEC_ID,13,1)==1)THEN IS_PRIMARY_LEG='TRUE' ELSE IS_PRIMARY_LEG='FALSE';");
      codeLines.Add("DECLARE SEC_ID,B;SEC_ID='FXF12345678_1';B=SUBSTRING(SEC_ID,13,1);");
      codeLines.Add("DECLARE IS_PRIMARY_LEG,SEC_ID;IS_PRIMARY_LEG='FALSE';SEC_ID='FXF12345678_1';IF(SEC_ID LIKE '%_1')THEN IS_PRIMARY_LEG='TRUE' ELSE IS_PRIMARY_LEG='FALSE';");
      codeLines.Add("DECLARE IS_FX,SEC_ID;IS_FX='FALSE';SEC_ID='FXF12345678_1';IF(SEC_ID LIKE 'FXF2%' OR SEC_ID LIKE 'FXF1%')THEN IS_FX='TRUE' ELSE IS_FX='FALSE';");
      codeLines.Add("DECLARE A;A=2;");
      codeLines.Add("DECLARE A,B,C,D;A=2;B=0;C=9;IF(A==2 AND B==0 AND C==10) THEN D=1 ELSE D=0;");
      codeLines.Add("DECLARE LOCAL_AMT,SECURITY_ID,ENTRYCOST;LOCAL_AMT=50.00;SECURITY_ID='BP071917P1HY5';IF(SECURITY_ID in('BP071917P1HY5','BP071917P2HY5','BP071917P3HY5','BP071917P4HY5','BP071917P5HY5','BP071917P6HY5')) THEN ENTRYCOST=100.00 ELSE ENTRYCOST=LOCAL_AMT;");
      codeLines.Add("DECLARE A;A=null;");
      codeLines.Add("DECLARE A,B;A=1;B=2;IF(A==1){IF(B==2)THEN A=10 ELSE A=5;}else{A=3;B=4;}");
      codeLines.Add("DECLARE A,B,C;A=null;B='TRUE';C=ISNULL(A,B);");
      codeLines.Add("DECLARE A,B;A=1;B=2;IF(A==2)THEN B=100 ELSE B=200;");
      codeLines.Add("DECLARE AssetLevel1,IndustryClass4,RESULT;AssetLevel1='FUTURE';IndustryClass4='BOND_FUTURES';IF(AssetLevel1 like 'FUTURE' AND IndustryClass4=='BOND_FUTURES')THEN RESULT=1 ELSE RESULT=0;");
      codeLines.Add("DECLARE A,B,RESULT;A=1;B=2;IF(A==1 AND B==2)THEN RESULT=1 ELSE RESULT=0;");
      codeLines.Add("DECLARE VAR1,VAR2,VAR4,RESULT;VAR1='YES';VAR2='NO';VAR4=1;IF((VAR1=='YES') AND VAR2=='NO' AND VAR4==1) THEN RESULT='TRUE' ELSE RESULT='FALSE';");
      codeLines.Add("DECLARE VAR1,VAR2,VAR4,RESULT;VAR1='YES';VAR2='YES';VAR4=1;IF(VAR1=='NO' OR (VAR2=='YES' AND VAR4==1)) THEN RESULT='TRUE' ELSE RESULT='FALSE';");
      codeLines.Add("DECLARE VAR1,VAR2,VAR4,RESULT;VAR1='YES';VAR2='YES';VAR4=1;IF(VAR1=='YES' OR VAR2=='YES' AND VAR4==2) THEN RESULT='TRUE' ELSE RESULT='FALSE';");
      codeLines.Add("DECLARE VAR1,VAR2,VAR4,RESULT;VAR1='YES';VAR2='YES';VAR4=1;IF((VAR1=='YES') OR (VAR2=='YES') AND (VAR4==1)) THEN RESULT='TRUE' ELSE RESULT='FALSE';");
      codeLines.Add("DECLARE VAR1,VAR2,VAR4,RESULT;VAR1='YES';VAR2='YES';VAR4=1;IF(VAR1=='YES' AND (VAR2=='YES') AND VAR4==1) THEN RESULT='TRUE' ELSE RESULT='FALSE';");
      codeLines.Add("DECLARE VAR1,VAR2,VAR4,RESULT;VAR1='YES';VAR2='YES';VAR4=1;IF((VAR1=='YES') AND VAR2=='NO') THEN RESULT='TRUE' ELSE RESULT='FALSE';");
      codeLines.Add("DECLARE VAR1,VAR2,VAR4,RESULT;VAR1='YES';VAR2='NO';VAR4=1;IF((VAR1=='YES') AND VAR2=='NO') THEN RESULT='TRUE' ELSE RESULT='FALSE';");
      codeLines.Add("DECLARE VAR1,VAR2,VAR4,RESULT;VAR1='YES';VAR2='NO';VAR4=1;IF((((((VAR1=='YES')))))) THEN RESULT='TRUE' ELSE RESULT='FALSE';");
      codeLines.Add("DECLARE VAR1,VAR2,VAR4,RESULT;VAR1='YES';VAR2='NO';VAR4=1;IF(VAR1=='YES') THEN RESULT='TRUE' ELSE RESULT='FALSE';");
      codeLines.Add("DECLARE VAR1,VAR2,VAR4,RESULT;VAR1=2;IF(VAR1==2) THEN RESULT='TRUE' ELSE RESULT='FALSE';");
      codeLines.Add("DECLARE VAR1,VAR2,VAR4,RESULT;VAR1=((ABS(-1)+2)+3);");
      codeLines.Add("DECLARE VAR1,VAR2,VAR4,RESULT;VAR1=-1;VAR2=-3;VAR2=ABS(VAR2)+1;");
      codeLines.Add("DECLARE A,B,C;A=1;B=2;C=3;IF(B>A){A=0;B=0;C=0;}ELSE{A=1;B=1;C=1;}");
      codeLines.Add("DECLARE A,B,C;A=1;B=2;C=3;IF(B<A){A=0;B=0;C=0;}ELSE{A=1;B=1;C=1;}");
      codeLines.Add("DECLARE A,B,C;A=1;B=2;C=3;IF(B<A){A=0;B=0;C=0;}ELSE{A=1;B=1;C=1;}");
      return codeLines;
    }
  }
}
