Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Test to_be_not_null refactored
  • Loading branch information
AlexisGaldamez committed Jan 12, 2018
commit 796a3d56f0dcd8cc6be691ea4b200e58524bf8fd
2 changes: 0 additions & 2 deletions old_tests/RunAll.sql
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ exec ut_coverage.coverage_start_develop();
@@lib/RunTest.sql ut_expectations/ut.expect.to_be_false.GivesFailureWhenExpessionIsTrue.sql
@@lib/RunTest.sql ut_expectations/ut.expect.to_be_false.GivesSuccessWhenExpessionIsFalse.sql
@@lib/RunTest.sql ut_expectations/ut.expect.to_be_like.FailsForUnsupportedDatatype.sql
@@ut_expectations/ut.expect.to_be_not_null.GivesFailureWhenActualIsNull.sql
@@ut_expectations/ut.expect.to_be_not_null.GivesSuccessWhenActualIsNotNull.sql
@@lib/RunTest.sql ut_expectations/ut.expect.to_be_null.anydata.GivesSuccessWhenAnydataIsNull.sql
@@lib/RunTest.sql ut_expectations/ut.expect.to_be_null.anydata.GivesSuccessWhenCollectionPassedIsNull.sql
@@lib/RunTest.sql ut_expectations/ut.expect.to_be_null.anydata.GivesSuccessWhenObjectPassedIsNull.sql
Expand Down

This file was deleted.

This file was deleted.

44 changes: 19 additions & 25 deletions test/core/expectations/test_expect_not_to_be_null.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,6 @@ is
execute immediate 'drop type '||gc_varray_name;
end;

function anydata_expectation_block(a_object_name in varchar2, a_object_value in varchar2,
a_object_type in varchar2)
return varchar2
is
begin
return 'DECLARE
l_object '||a_object_name||' := '||a_object_value||';
BEGIN
ut3.ut.expect(anydata.convert'||a_object_type||'(l_object)).not_to_be_null();
END;';
end;

procedure blob_not_null
is
begin
Expand Down Expand Up @@ -140,40 +128,43 @@ is
ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).to_be_empty();
end;

procedure null_blob
procedure initialized_object
is
begin
--Act
execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'blob', 'null');
execute immediate expectations_helpers.unary_expectation_object_block('not_to_be_null', gc_object_name,
gc_object_name||'(1)', 'object');
--Assert
ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).not_to_be_empty();
ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).to_be_empty();
end;

procedure initialized_object
procedure initialized_nested_table
is
begin
--Act
execute immediate anydata_expectation_block(gc_object_name, gc_object_name||'(1)', 'object');
execute immediate expectations_helpers.unary_expectation_object_block('not_to_be_null', gc_nested_table_name,
gc_nested_table_name||'()', 'collection');
--Assert
ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).to_be_empty();
end;

procedure initialized_nested_table
procedure initialized_varray
is
begin
--Act
execute immediate anydata_expectation_block(gc_nested_table_name, gc_nested_table_name||'()', 'collection');
execute immediate expectations_helpers.unary_expectation_object_block('not_to_be_null', gc_varray_name,
gc_varray_name||'()', 'collection');
--Assert
ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).to_be_empty();
end;

procedure initialized_varray
procedure null_blob
is
begin
--Act
execute immediate anydata_expectation_block(gc_varray_name, gc_varray_name||'()', 'collection');
execute immediate expectations_helpers.unary_expectation_block('not_to_be_null', 'blob', 'null');
--Assert
ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).to_be_empty();
ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).not_to_be_empty();
end;

procedure null_boolean
Expand Down Expand Up @@ -268,7 +259,8 @@ is
is
begin
--Act
execute immediate anydata_expectation_block(gc_object_name, 'null', 'object');
execute immediate expectations_helpers.unary_expectation_object_block('not_to_be_null', gc_object_name,
'null', 'object');
--Assert
ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).not_to_be_empty();
end;
Expand All @@ -277,7 +269,8 @@ is
is
begin
--Act
execute immediate anydata_expectation_block(gc_nested_table_name, 'null', 'collection');
execute immediate expectations_helpers.unary_expectation_object_block('not_to_be_null', gc_nested_table_name,
'null', 'collection');
--Assert
ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).not_to_be_empty();
end;
Expand All @@ -286,7 +279,8 @@ is
is
begin
--Act
execute immediate anydata_expectation_block(gc_varray_name, 'null', 'collection');
execute immediate expectations_helpers.unary_expectation_object_block('not_to_be_null', gc_varray_name,
'null', 'collection');
--Assert
ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).not_to_be_empty();
end;
Expand Down
Loading