text: ﻿CREATE PROCEDURE [templateSchema__templateDimCoreName_predim_Step2_prep_columnTransformations_vw].[test Columns Transformed Correctly]
  AS
  BEGIN
  	--ASSEMBLE
  	IF OBJECT_ID('[templateSchema__templateDimCoreName_predim_Step2_prep_columnTransformations_vw].ACTUAL') IS NOT NULL DROP TABLE [templateSchema__templateDimCoreName_predim_Step2_prep_columnTransformations_vw].ACTUAL;
  	IF OBJECT_ID('[templateSchema__templateDimCoreName_predim_Step2_prep_columnTransformations_vw].EXPECTED') IS NOT NULL DROP TABLE [templateSchema__templateDimCoreName_predim_Step2_prep_columnTransformations_vw].EXPECTED;
  
  	EXECUTE tSQLt.FakeTable @TableName = '[StagingSchema].[templateDimCoreName_dimSrc_stg]';
  	EXECUTE tSQLt.FakeTable @TableName = '[dimensionSchema].[templateDimCoreName_Dim]';
  	EXECUTE TestHelpers.[DataBuilder_StagingSchema_templateDimCoreName_dimSrc_stg] @NK_SourceSystemID1 = 1, @NK_SourceSystemID2 = 1, @SampleColumnOne = 'SampleColumnOne', @SampleColumnTwo = NULL, @Ctl_EffectiveDate = '2000-12-31';
  	EXECUTE TestHelpers.[DataBuilder_StagingSchema_templateDimCoreName_dimSrc_stg] @NK_SourceSystemID1 = 1, @NK_SourceSystemID2 = 2, @SampleColumnOne = NULL, @SampleColumnTwo = 9, @Ctl_EffectiveDate = '2000-12-31';
  
  	/*Remember, the column transformation logic depends on SKs being populated*/
  	EXECUTE TestHelpers.[DataBuilder_dimensionSchema_templateDimCoreName_Dim] @SK_templateDimCoreName = 1, @NK_SourceSystemID1 = 1, @NK_SourceSystemID2 = 2, @Ctl_CurrentFlag = 1;
  	EXECUTE TestHelpers.[DataBuilder_dimensionSchema_templateDimCoreName_Dim] @SK_templateDimCoreName = 2, @NK_SourceSystemID1 = 1, @NK_SourceSystemID2 = 2, @Ctl_CurrentFlag = 0;
  	EXECUTE TestHelpers.[DataBuilder_dimensionSchema_templateDimCoreName_Dim] @SK_templateDimCoreName = 3, @NK_SourceSystemID1 = 1, @NK_SourceSystemID2 = 2, @Ctl_CurrentFlag = 0;
  
  	--ACT
  	SELECT 
  	 [SCD_Status]
  	,[NK_SourceSystemID1]
  	,[NK_SourceSystemID2]
  	,[SampleColumnOne]
  	,[SampleColumnTwo]
  	,[Ctl_EffectiveDate]
  	INTO [templateSchema__templateDimCoreName_predim_Step2_prep_columnTransformations_vw].ACTUAL
  	FROM [templateSchema].[templateDimCoreName_predim_Step2_prep_columnTransformations_vw];
  
  	--ASSERT
  	CREATE TABLE [templateSchema__templateDimCoreName_predim_Step2_prep_columnTransformations_vw].EXPECTED (
  		 [SCD_Status] VARCHAR(30)
  		,[NK_SourceSystemID1] NVARCHAR(500)
  		,[NK_SourceSystemID2] NVARCHAR(500)
  		,[SampleColumnOne] VARCHAR(500)
  		,[SampleColumnTwo] VARCHAR(500)
  		,[Ctl_EffectiveDate] DATETIME2(7)
  	);
  	INSERT INTO [templateSchema__templateDimCoreName_predim_Step2_prep_columnTransformations_vw].EXPECTED (
  		 [SCD_Status]
  		,[NK_SourceSystemID1]
  		,[NK_SourceSystemID2]
  		,[SampleColumnOne]
  		,[SampleColumnTwo]
  		,[Ctl_EffectiveDate]
  	) VALUES
  		/*New Natural Keys*/
  		('NEW', 1, 1, 'SampleColumnOne', '*UNKNOWN', '1900-01-01')
  		/*Known Natural Keys*/
  		,('PENDING',1,2, '*UNKNOWN', '9', '2000-12-31');
  
  	EXECUTE [tSQLt].AssertEqualsTable @Expected = '[templateSchema__templateDimCoreName_predim_Step2_prep_columnTransformations_vw].EXPECTED', @Actual = '[templateSchema__templateDimCoreName_predim_Step2_prep_columnTransformations_vw].ACTUAL';
  
  END
  
  /****
  Script generated by cookiecutter, for completion by user.
  https://github.com/sdoubleday/cookiecutter-tsqlt-class-vs
  This test compares the contents of EXPECTED and ACTUAL.
  ****/
  /****
  Suggestion: Verify the object being selected from in the
  Act section. It defaults to your object under test.
  ****/
  