61 lines
1.5 KiB
Perl
61 lines
1.5 KiB
Perl
package Peace::Test::Mock::Model::Application;
|
|
|
|
use v5.30.0;
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
use Peace::Model::Application;
|
|
|
|
use Peace::Test::Mock::Model::Developer;
|
|
|
|
sub new {
|
|
my $class = shift;
|
|
return Peace::Model::Application->new(
|
|
name => 'Desfronificator',
|
|
description => 'Desfronifies the files.',
|
|
url => 'desfronificator.example.com',
|
|
developer => Peace::Test::Mock::Model::Developer->new,
|
|
price => 0,
|
|
flatpak_builder_file => './resources/com.example.desfronificator.yml',
|
|
flatpak_repo => 'https://nightly.gnome.org/gnome-nightly.flatpakrepo',
|
|
git_repo =>
|
|
'https://git.desfronificator.example.com/larry/desfronificator.git',
|
|
verified => 0,
|
|
);
|
|
}
|
|
1;
|
|
=encoding utf8
|
|
|
|
=head1 NAME
|
|
|
|
Peace::Test::Mock::Model::Application - Mock object for Peace::Model::Application.
|
|
|
|
=head1 SYNOPSIS
|
|
|
|
my $application = Peace::Test::Mock::Model::Application->new;
|
|
|
|
=head1 DESCRIPTION
|
|
|
|
Peace::Test::Mock::Model::Application aims to reduce repeated code which
|
|
doesn't bring new things to tests by avoiding to add long lines
|
|
in order to create a L<Peace::Model::Application> object on a
|
|
unrelated test by providing a stub one already created object.
|
|
|
|
=head1 INSTANCE METHODS
|
|
|
|
Peace::Test::Mock::Model::Application implements the following instance
|
|
methods:
|
|
|
|
=head2 new
|
|
|
|
my $application = Peace::Test::Mock::Model::Application->new;
|
|
|
|
Returns a mock L<Peace::Model::Application> object.
|
|
|
|
=head1 SEE ALSO
|
|
|
|
L<Peace::Model::Application>.
|
|
|
|
=cut
|