Siebel-Integration-Com

 view release on metacpan or  search on metacpan

t/test.t  view on Meta::CPAN

		Value => 'ABCD',
		Prop1 => 'This is Test Prop 1 Value set',
		Prop2 => '2',
		Prop3 => '3',
		Prop4 => '4',
		Prop5 => '5',
		Prop6 => '6',
	);
	
	my $PS = $SiebelApp->NewPropertySet();
	isa_ok($PS,'Siebel::Integration::Com::PropSet', 'COM Siebel propset created 1');
	is($PS->Error, '', 'Com Siebel Propset created 2');

	my $PSChild1 = $SiebelApp->NewPropertySet();
	is($PSChild1->Error, '', 'Com Siebel Propset created 3');
	my $PSChild2 = $SiebelApp->NewPropertySet();
	is($PSChild2->Error, '', 'Com Siebel Propset created 4');
	my $PSChild3 = $SiebelApp->NewPropertySet();
	is($PSChild3->Error, '', 'Com Siebel Propset created 5');
	my $PSGrandChild1 = $SiebelApp->NewPropertySet();
	is($PSGrandChild1->Error, '', 'Com Siebel Propset created 6');
	my $PSGrandChild2 = $SiebelApp->NewPropertySet();
	is($PSGrandChild2->Error, '', 'Com Siebel Propset created 7');

	is($PS->GetPropertyCount(), 0, 'GetPropertyCount PS has no properties');
	
	is($PS->GetType(), '', 'GetType PS has no type');
	is($PS->GetValue(), '', 'GetValue PS has no value');

	ok($PS->SetType($props{Type}), "SetType PS has had its type set");
	is($PS->GetType(), $props{Type}, "GetType PS type value returned = type set");
	
	ok($PS->SetValue($props{Value}), "SetValue PS has had its value set");

t/test.t  view on Meta::CPAN

########################################################################################################################################################
###############################					START BS TESTS							################################################################
########################################################################################################################################################
sub TestBS{
	my $SiebelApp = shift;
	my $BS = $SiebelApp->GetService('Workflow Utilities');
	isa_ok($BS,'Siebel::Integration::Com::BusSrv', 'Business Service Workflow Utilities Created 1');
	is($BS->Error, '', 'Business Service Workflow Utilities Created 2') || return 'Error';
	
	my $PS = $SiebelApp->NewPropertySet();
	isa_ok($PS,'Siebel::Integration::Com::PropSet', 'COM Siebel propset created 1');
	is($PS->Error, '', 'Com Siebel Propset created 2');
	
	my $PSChild = $SiebelApp->NewPropertySet();
	isa_ok($PSChild,'Siebel::Integration::Com::PropSet', 'COM Siebel propset created 3');
	is($PSChild->Error, '', 'Com Siebel Propset created 4');
	
	my $Outputs = $SiebelApp->NewPropertySet();
	isa_ok($Outputs,'Siebel::Integration::Com::PropSet', 'COM Siebel propset created 5');
	is($Outputs->Error, '', 'Com Siebel Propset created 6');
	
	ok($PS->SetProperty('Prop Par 1', 'Prop Par 1 Value'), "SetProperty Par");
	ok($PS->SetType('This is a type'), "SetType Par");
	ok($PS->SetValue('And this is its value'),"SetValue Par");
	ok($PSChild->SetProperty('Prop Child 1', 'Prop Child 1 Value'), "SetProperty Child");
	is($PS->AddChild($PSChild),0,"AddChild");
	
	ok($BS->InvokeMethod('Echo', $PS, $Outputs),"Workflow Utilities Echo Method Called");
	
	is($Outputs->GetPropertyCount(), 1, 'Outputs: GetPropertyCount PS has 1 property');



( run in 0.689 second using v1.01-cache-2.11-cpan-f56aa216473 )