@@ -501,10 +501,12 @@ public void InvokeCommand_AddBooleanToSite_ShouldSucceed()
501501 }
502502 ) ;
503503 var result1 = context . Runspace . InvokeCommand < Column > (
504- "Get-KshColumn " ,
504+ "Add-KshColumnBoolean " ,
505505 new Dictionary < string , object > ( )
506506 {
507- [ "ColumnId" ] = context . AppSettings [ "Column10Id" ]
507+ [ "Name" ] = "TestColumn99" ,
508+ [ "Title" ] = "Test Column 99" ,
509+ [ "AddColumnInternalNameHint" ] = true
508510 }
509511 ) ;
510512 var result2 = context . Runspace . InvokeCommand < ColumnCalculated > (
@@ -520,7 +522,7 @@ public void InvokeCommand_AddBooleanToSite_ShouldSucceed()
520522 [ "CustomFormatter" ] = /*lang=json,strict*/ "{ \" txtContent\" : \" @currentField\" }" ,
521523 [ "Description" ] = "Test Column 0 Description" ,
522524 [ "Direction" ] = "none" ,
523- [ "Formula" ] = "=TestColumn10 " ,
525+ [ "Formula" ] = "=TestColumn99 " ,
524526 [ "Group" ] = "Test Column 0 Group" ,
525527 [ "Hidden" ] = true ,
526528 [ "Id" ] = "35aa78a6-66d7-472c-ab6b-d534193842af" ,
@@ -549,6 +551,13 @@ public void InvokeCommand_AddBooleanToSite_ShouldSucceed()
549551 [ "Identity" ] = result2 [ 0 ]
550552 }
551553 ) ;
554+ _ = context . Runspace . InvokeCommand (
555+ "Remove-KshColumn" ,
556+ new Dictionary < string , object > ( )
557+ {
558+ [ "Identity" ] = result1 [ 0 ]
559+ }
560+ ) ;
552561 var actual = result2 [ 0 ] ;
553562 Assert . That ( actual , Is . Not . Null ) ;
554563 }
@@ -568,10 +577,12 @@ public void InvokeCommand_AddCurrencyToSite_ShouldSucceed()
568577 }
569578 ) ;
570579 var result1 = context . Runspace . InvokeCommand < Column > (
571- "Get-KshColumn " ,
580+ "Add-KshColumnCurrency " ,
572581 new Dictionary < string , object > ( )
573582 {
574- [ "ColumnId" ] = context . AppSettings [ "Column6Id" ]
583+ [ "Name" ] = "TestColumn99" ,
584+ [ "Title" ] = "Test Column 99" ,
585+ [ "AddColumnInternalNameHint" ] = true
575586 }
576587 ) ;
577588 var result2 = context . Runspace . InvokeCommand < ColumnCalculated > (
@@ -588,7 +599,7 @@ public void InvokeCommand_AddCurrencyToSite_ShouldSucceed()
588599 [ "CustomFormatter" ] = /*lang=json,strict*/ "{ \" txtContent\" : \" @currentField\" }" ,
589600 [ "Description" ] = "Test Column 0 Description" ,
590601 [ "Direction" ] = "none" ,
591- [ "Formula" ] = "=TestColumn6 " ,
602+ [ "Formula" ] = "=TestColumn99 " ,
592603 [ "Group" ] = "Test Column 0 Group" ,
593604 [ "Hidden" ] = true ,
594605 [ "Id" ] = "35aa78a6-66d7-472c-ab6b-d534193842af" ,
@@ -618,6 +629,13 @@ public void InvokeCommand_AddCurrencyToSite_ShouldSucceed()
618629 [ "Identity" ] = result2 [ 0 ]
619630 }
620631 ) ;
632+ _ = context . Runspace . InvokeCommand (
633+ "Remove-KshColumn" ,
634+ new Dictionary < string , object > ( )
635+ {
636+ [ "Identity" ] = result1 [ 0 ]
637+ }
638+ ) ;
621639 var actual = result2 [ 0 ] ;
622640 Assert . That ( actual , Is . Not . Null ) ;
623641 }
@@ -637,10 +655,12 @@ public void InvokeCommand_AddDateTimeToSite_ShouldSucceed()
637655 }
638656 ) ;
639657 var result1 = context . Runspace . InvokeCommand < Column > (
640- "Get-KshColumn " ,
658+ "Add-KshColumnDateTime " ,
641659 new Dictionary < string , object > ( )
642660 {
643- [ "ColumnId" ] = context . AppSettings [ "Column7Id" ]
661+ [ "Name" ] = "TestColumn99" ,
662+ [ "Title" ] = "Test Column 99" ,
663+ [ "AddColumnInternalNameHint" ] = true
644664 }
645665 ) ;
646666 var result2 = context . Runspace . InvokeCommand < ColumnCalculated > (
@@ -657,7 +677,7 @@ public void InvokeCommand_AddDateTimeToSite_ShouldSucceed()
657677 [ "DateFormat" ] = "DateTime" ,
658678 [ "Description" ] = "Test Column 0 Description" ,
659679 [ "Direction" ] = "none" ,
660- [ "Formula" ] = "=TestColumn7 " ,
680+ [ "Formula" ] = "=TestColumn99 " ,
661681 [ "Group" ] = "Test Column 0 Group" ,
662682 [ "Hidden" ] = true ,
663683 [ "Id" ] = "35aa78a6-66d7-472c-ab6b-d534193842af" ,
@@ -686,6 +706,13 @@ public void InvokeCommand_AddDateTimeToSite_ShouldSucceed()
686706 [ "Identity" ] = result2 [ 0 ]
687707 }
688708 ) ;
709+ _ = context . Runspace . InvokeCommand (
710+ "Remove-KshColumn" ,
711+ new Dictionary < string , object > ( )
712+ {
713+ [ "Identity" ] = result1 [ 0 ]
714+ }
715+ ) ;
689716 var actual = result2 [ 0 ] ;
690717 Assert . That ( actual , Is . Not . Null ) ;
691718 }
@@ -705,10 +732,12 @@ public void InvokeCommand_AddNumberToSite_ShouldSucceed()
705732 }
706733 ) ;
707734 var result1 = context . Runspace . InvokeCommand < Column > (
708- "Get-KshColumn " ,
735+ "Add-KshColumnNumber " ,
709736 new Dictionary < string , object > ( )
710737 {
711- [ "ColumnId" ] = context . AppSettings [ "Column5Id" ]
738+ [ "Name" ] = "TestColumn99" ,
739+ [ "Title" ] = "Test Column 99" ,
740+ [ "AddColumnInternalNameHint" ] = true
712741 }
713742 ) ;
714743 var result2 = context . Runspace . InvokeCommand < ColumnCalculated > (
@@ -724,7 +753,7 @@ public void InvokeCommand_AddNumberToSite_ShouldSucceed()
724753 [ "CustomFormatter" ] = /*lang=json,strict*/ "{ \" txtContent\" : \" @currentField\" }" ,
725754 [ "Description" ] = "Test Column 0 Description" ,
726755 [ "Direction" ] = "none" ,
727- [ "Formula" ] = "=TestColumn5 " ,
756+ [ "Formula" ] = "=TestColumn99 " ,
728757 [ "Group" ] = "Test Column 0 Group" ,
729758 [ "Hidden" ] = true ,
730759 [ "Id" ] = "35aa78a6-66d7-472c-ab6b-d534193842af" ,
@@ -755,6 +784,13 @@ public void InvokeCommand_AddNumberToSite_ShouldSucceed()
755784 [ "Identity" ] = result2 [ 0 ]
756785 }
757786 ) ;
787+ _ = context . Runspace . InvokeCommand (
788+ "Remove-KshColumn" ,
789+ new Dictionary < string , object > ( )
790+ {
791+ [ "Identity" ] = result1 [ 0 ]
792+ }
793+ ) ;
758794 var actual = result2 [ 0 ] ;
759795 Assert . That ( actual , Is . Not . Null ) ;
760796 }
@@ -774,33 +810,28 @@ public void InvokeCommand_AddTextToSite_ShouldSucceed()
774810 }
775811 ) ;
776812 var result1 = context . Runspace . InvokeCommand < Column > (
777- "Get-KshColumn" ,
778- new Dictionary < string , object > ( )
779- {
780- [ "ColumnId" ] = context . AppSettings [ "Column1Id" ]
781- }
782- ) ;
783- var result2 = context . Runspace . InvokeCommand < Column > (
784- "Get-KshColumn" ,
813+ "Add-KshColumnText" ,
785814 new Dictionary < string , object > ( )
786815 {
787- [ "ColumnId" ] = context . AppSettings [ "Column3Id" ]
816+ [ "Name" ] = "TestColumn99" ,
817+ [ "Title" ] = "Test Column 99" ,
818+ [ "AddColumnInternalNameHint" ] = true
788819 }
789820 ) ;
790- var result3 = context . Runspace . InvokeCommand < ColumnCalculated > (
821+ var result2 = context . Runspace . InvokeCommand < ColumnCalculated > (
791822 "Add-KshColumnCalculated" ,
792823 new Dictionary < string , object > ( )
793824 {
794825 // { "ClientSideComponentId", null },
795826 // { "ClientSideComponentProperties", null },
796827 [ "Columns" ] = new [ ]
797828 {
798- result1 [ 0 ] , result2 [ 0 ]
829+ result1 [ 0 ]
799830 } ,
800831 [ "CustomFormatter" ] = /*lang=json,strict*/ "{ \" txtContent\" : \" @currentField\" }" ,
801832 [ "Description" ] = "Test Column 0 Description" ,
802833 [ "Direction" ] = "none" ,
803- [ "Formula" ] = "=TestColumn1&TestColumn3 " ,
834+ [ "Formula" ] = "=TestColumn99 " ,
804835 [ "Group" ] = "Test Column 0 Group" ,
805836 [ "Hidden" ] = true ,
806837 [ "Id" ] = "35aa78a6-66d7-472c-ab6b-d534193842af" ,
@@ -818,18 +849,25 @@ public void InvokeCommand_AddTextToSite_ShouldSucceed()
818849 "Set-KshColumnCalculated" ,
819850 new Dictionary < string , object > ( )
820851 {
821- [ "Identity" ] = result3 [ 0 ] ,
852+ [ "Identity" ] = result2 [ 0 ] ,
822853 [ "Hidden" ] = false
823854 }
824855 ) ;
825856 _ = context . Runspace . InvokeCommand (
826857 "Remove-KshColumn" ,
827858 new Dictionary < string , object > ( )
828859 {
829- [ "Identity" ] = result3 [ 0 ]
860+ [ "Identity" ] = result2 [ 0 ]
830861 }
831862 ) ;
832- var actual = result3 [ 0 ] ;
863+ _ = context . Runspace . InvokeCommand (
864+ "Remove-KshColumn" ,
865+ new Dictionary < string , object > ( )
866+ {
867+ [ "Identity" ] = result1 [ 0 ]
868+ }
869+ ) ;
870+ var actual = result2 [ 0 ] ;
833871 Assert . That ( actual , Is . Not . Null ) ;
834872 }
835873
0 commit comments