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

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
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.

48 changes: 21 additions & 27 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 All @@ -49,7 +37,7 @@ is
ut.expect(anydata.convertCollection(ut3.ut_expectation_processor.get_failed_expectations())).to_be_empty();
end;

procedure blob_0_lengt
procedure blob_0_length
is
begin
--Act
Expand Down Expand Up @@ -77,7 +65,7 @@ is
end;


procedure clob_0_lengt
procedure clob_0_length
is
begin
--Act
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
4 changes: 2 additions & 2 deletions test/core/expectations/test_expect_not_to_be_null.pks
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ is
procedure blob_not_null;

--%test(Gives success for blob with length 0)
procedure blob_0_lengt;
procedure blob_0_length;

--%test(Gives success for not null boolean)
procedure boolean_not_null;
Expand All @@ -25,7 +25,7 @@ is
procedure clob_not_null;

--%test(Gives success for clob with length 0)
procedure clob_0_lengt;
procedure clob_0_length;

--%test(Gives success for not null date)
procedure date_not_null;
Expand Down
Loading