Skip to content

Commit b04b9bb

Browse files
committed
update tests & readme
update tests & readme
1 parent 0fdaced commit b04b9bb

37 files changed

+1781
-45
lines changed

.github/workflows/ant.yml

+14-19
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# This workflow will build a Java project with Ant
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-ant
3+
14
name: Java CI
25

36
on:
@@ -8,25 +11,17 @@ on:
811

912
jobs:
1013
build:
14+
1115
runs-on: ubuntu-latest
1216

1317
steps:
14-
- uses: actions/checkout@v3
15-
- name: Set up JDK 17
16-
uses: actions/setup-java@v3
17-
with:
18-
java-version: '17'
19-
distribution: 'zulu'
20-
- name: Cache Maven packages
21-
uses: actions/cache@v3
22-
with:
23-
path: ~/.m2
24-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
25-
restore-keys: |
26-
${{ runner.os }}-maven-
27-
- name: Build with Maven
28-
run: mvn clean install -DskipTests
29-
- name: Build with Ant
30-
run: |
31-
ant -noinput -buildfile build.xml
32-
java -cp target/classes com.bulletinfotech.licitacao.LicitacaoApp
18+
- uses: actions/checkout@v4
19+
- name: Set up JDK 17
20+
uses: actions/setup-java@v4
21+
with:
22+
java-version: '17'
23+
distribution: 'zulu'
24+
- name: Build with Ant
25+
run: |
26+
ant -noinput -buildfile build.xml
27+
java -cp build/classes com.bulletinfotech.licitacao.LicitacaoApp

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
<p align="center">
44

5-
[![Java CI](https://github.com/Bulletdev/Arremate-certo/actions/workflows/ant.yml/badge.svg)](https://github.com/Bulletdev/Arremate-certo/actions/workflows/ant.y)
6-
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Bulletdev_Arremate-certo&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Bulletdev_Arremate-certo)
7-
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=Bulletdev_Arremate-certo&metric=bugs)](https://sonarcloud.io/summary/new_code?id=Bulletdev_Arremate-certo)
8-
<img src="https://img.shields.io/badge/status-em_desenvolvimento-yellow"> <img src="https://img.shields.io/badge/release_date-Março_2025-blue"></p>
5+
[![Java CI](https://github.com/Bulletdev/Arremate-certo/actions/workflows/ant.yml/badge.svg)](https://github.com/Bulletdev/Arremate-certo/actions/workflows/ant.y)
6+
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Bulletdev_Arremate-certo&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=Bulletdev_Arremate-certo)
7+
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=Bulletdev_Arremate-certo&metric=bugs)](https://sonarcloud.io/summary/new_code?id=Bulletdev_Arremate-certo)
8+
<img src="https://img.shields.io/badge/status-em_desenvolvimento-yellow"> <img src="https://img.shields.io/badge/release_date-Março_2025-blue"></p>
99

1010
<p align="center">
1111
Arremate Certo é uma solução moderna de automação para licitações públicas e dispensas.
@@ -31,7 +31,7 @@ Arremate Certo é uma solução moderna de automação para licitações públic
3131
6. [Contribuindo](#-contribuindo)
3232
7. [Licença](#-licença)
3333
8. [Suporte](#-suporte)
34-
34+
3535

3636
## 🏗️ Arquitetura do Projeto
3737

build.xml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
11
<project name="ArremateCerto" default="run" basedir=".">
22
<description>Build file for ArremateCerto project</description>
3-
3+
44
<!-- Set global properties for this build -->
55
<property name="src.dir" value="src/main/java"/>
66
<property name="build.dir" value="target/classes"/>
77
<property name="lib.dir" value="libs"/>
8-
8+
99
<!-- Initialize directories -->
1010
<target name="init">
1111
<mkdir dir="${build.dir}"/>
1212
<mkdir dir="${lib.dir}"/>
1313
</target>
14-
14+
1515
<!-- Compile the source code -->
1616
<target name="compile" depends="init">
1717
<javac srcdir="${src.dir}" destdir="${build.dir}" includeantruntime="false">
1818
<classpath>
1919
<fileset dir="${lib.dir}">
2020
<include name="**/*.jar"/>
2121
</fileset>
22-
<fileset dir="${user.home}/.m2/repository">
23-
<include name="**/*.jar"/>
22+
<fileset dir="${user.home}/.m2/repository/org/springframework/boot/spring-boot-starter/2.5.4">
23+
<include name="spring-boot-starter-2.5.4.jar"/>
2424
</fileset>
2525
</classpath>
2626
</javac>
2727
</target>
28-
28+
2929
<!-- Run the application -->
3030
<target name="run" depends="compile">
3131
<java classname="com.bulletinfotech.licitacao.LicitacaoApp" fork="true">
@@ -34,8 +34,8 @@
3434
<fileset dir="${lib.dir}">
3535
<include name="**/*.jar"/>
3636
</fileset>
37-
<fileset dir="${user.home}/.m2/repository">
38-
<include name="**/*.jar"/>
37+
<fileset dir="${user.home}/.m2/repository/org/springframework/boot/spring-boot-starter/2.5.4">
38+
<include name="spring-boot-starter-2.5.4.jar"/>
3939
</fileset>
4040
</classpath>
4141
</java>

src/main/java/com/bulletinfotech/licitacao/model/Pregao.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ public Pregao(String descricao, String situacao, double valorProposto) {
1919
public void setDescricao(String descricao) { this.descricao = descricao; }
2020
public void setSituacao(String situacao) { this.situacao = situacao; }
2121
public void setValorProposto(double valorProposto) { this.valorProposto = valorProposto; }
22-
}
22+
}

src/main/java/com/bulletinfotech/licitacao/service/ApiService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
public class ApiService {
55

6-
public static void connectToPortalApi(String portal, String token) {
6+
public static void connectToPortalApi(String portal, String token) {
77
// TODO: Implement actual connection to portal's API
88
System.out.println("Connecting to API of portal: " + portal);
99
}

src/main/java/com/bulletinfotech/licitacao/view/LoginFrame.java

+7-8
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@
55
import java.awt.*;
66
import java.awt.event.ActionEvent;
77
import java.awt.event.ActionListener;
8+
import java.util.Objects;
89

910
public class LoginFrame extends JFrame {
1011

11-
private JTextField txtCnpj;
12-
private JPasswordField txtPassword;
13-
private JComboBox<String> comboPortal;
14-
private JButton btnImportCert;
15-
private JButton btnLogin;
12+
private final JTextField txtCnpj;
13+
private final JPasswordField txtPassword;
14+
private final JComboBox<String> comboPortal;
1615

1716
public LoginFrame() {
1817
setTitle("Login - Licitação");
@@ -34,10 +33,10 @@ public LoginFrame() {
3433
comboPortal = new JComboBox<>(new String[]{"ComprasNet", "Licitações-e", "Compras Públicas"});
3534
panel.add(comboPortal);
3635

37-
btnImportCert = new JButton("Importar Certificado");
36+
JButton btnImportCert = new JButton("Importar Certificado");
3837
panel.add(btnImportCert);
3938

40-
btnLogin = new JButton("Login");
39+
JButton btnLogin = new JButton("Login");
4140
panel.add(btnLogin);
4241

4342
add(panel, BorderLayout.CENTER);
@@ -56,7 +55,7 @@ public void actionPerformed(ActionEvent e) {
5655
// TODO: Implement login action to authenticate with selected portal
5756
String cnpj = txtCnpj.getText();
5857
char[] password = txtPassword.getPassword();
59-
String portal = comboPortal.getSelectedItem().toString();
58+
String portal = Objects.requireNonNull(comboPortal.getSelectedItem()).toString();
6059

6160
// Stub method call to AuthController for authentication
6261
// AuthController.authenticate(cnpj, new String(password), portal);

src/main/java/com/bulletinfotech/licitacao/view/MainFrame.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
public class MainFrame extends JFrame {
99

1010
public MainFrame() {
11-
setTitle("Sistema de Licitação");
12-
setSize(800, 600);
11+
setTitle("Arremate Certo");
12+
setSize(900, 700);
1313
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
1414
initMenu();
1515
}

src/main/java/integração.java

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
// será que funfa meu nobre?

src/test/java/com/bulletinfotech/licitacao/LicitacaoAppTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ public void setValorPropostoShouldUpdateValorProposto() {
5353
pregao.setValorProposto(2000.0);
5454
assertEquals(2000.0, pregao.getValorProposto());
5555
}
56-
}
56+
}

static-analysis.datadog.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
schema-version: v1
2+
rulesets:
3+
- java-best-practices
4+
- java-code-style
5+
- java-security

target/maven-archiver/pom.properties

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
artifactId=licitacao-app
2+
groupId=com.bulletinfotech
3+
version=1.0-SNAPSHOT
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
com\bulletinfotech\licitacao\view\LoginFrame$2.class
2+
com\bulletinfotech\licitacao\service\ApiService.class
3+
com\bulletinfotech\licitacao\LicitacaoApp.class
4+
com\bulletinfotech\licitacao\service\CertificateService.class
5+
com\bulletinfotech\licitacao\view\LoginFrame$1.class
6+
com\bulletinfotech\licitacao\view\MainFrame.class
7+
com\bulletinfotech\licitacao\controller\AuthController.class
8+
com\bulletinfotech\licitacao\model\ConfiguracaoDisputa.class
9+
com\bulletinfotech\licitacao\view\LoginFrame.class
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
C:\PROJETOS\Arremate-certo\src\main\java\com\bulletinfotech\licitacao\view\MainFrame.java
2+
C:\PROJETOS\Arremate-certo\src\main\java\integração.java
3+
C:\PROJETOS\Arremate-certo\src\main\java\com\bulletinfotech\licitacao\LicitacaoApp.java
4+
C:\PROJETOS\Arremate-certo\src\main\java\com\bulletinfotech\licitacao\service\ApiService.java
5+
C:\PROJETOS\Arremate-certo\src\main\java\com\bulletinfotech\licitacao\controller\AuthController.java
6+
C:\PROJETOS\Arremate-certo\src\main\java\com\bulletinfotech\licitacao\view\LoginFrame.java
7+
C:\PROJETOS\Arremate-certo\src\main\java\com\bulletinfotech\licitacao\model\ConfiguracaoDisputa.java
8+
C:\PROJETOS\Arremate-certo\src\main\java\com\bulletinfotech\licitacao\service\CertificateService.java

target/site/css/maven-base.css

+168
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
body {
21+
margin: 0px;
22+
padding: 0px;
23+
}
24+
table {
25+
padding:0px;
26+
width: 100%;
27+
margin-left: -2px;
28+
margin-right: -2px;
29+
}
30+
acronym {
31+
cursor: help;
32+
border-bottom: 1px dotted #feb;
33+
}
34+
table.bodyTable th, table.bodyTable td {
35+
padding: 2px 4px 2px 4px;
36+
vertical-align: top;
37+
}
38+
div.clear {
39+
clear:both;
40+
visibility: hidden;
41+
}
42+
div.clear hr {
43+
display: none;
44+
}
45+
#bannerLeft, #bannerRight {
46+
font-size: xx-large;
47+
font-weight: bold;
48+
}
49+
#bannerLeft img, #bannerRight img {
50+
margin: 0px;
51+
}
52+
.xleft, #bannerLeft img {
53+
float:left;
54+
}
55+
.xright, #bannerRight {
56+
float:right;
57+
}
58+
#banner {
59+
padding: 0px;
60+
}
61+
#breadcrumbs {
62+
padding: 3px 10px 3px 10px;
63+
}
64+
#leftColumn {
65+
width: 170px;
66+
float:left;
67+
overflow: auto;
68+
}
69+
#bodyColumn {
70+
margin-right: 1.5em;
71+
margin-left: 197px;
72+
}
73+
#legend {
74+
padding: 8px 0 8px 0;
75+
}
76+
#navcolumn {
77+
padding: 8px 4px 0 8px;
78+
}
79+
#navcolumn h5 {
80+
margin: 0;
81+
padding: 0;
82+
font-size: small;
83+
}
84+
#navcolumn ul {
85+
margin: 0;
86+
padding: 0;
87+
font-size: small;
88+
}
89+
#navcolumn li {
90+
list-style-type: none;
91+
background-image: none;
92+
background-repeat: no-repeat;
93+
background-position: 0 0.4em;
94+
padding-left: 16px;
95+
list-style-position: outside;
96+
line-height: 1.2em;
97+
font-size: smaller;
98+
}
99+
#navcolumn li.expanded {
100+
background-image: url(../images/expanded.gif);
101+
}
102+
#navcolumn li.collapsed {
103+
background-image: url(../images/collapsed.gif);
104+
}
105+
#navcolumn li.none {
106+
text-indent: -1em;
107+
margin-left: 1em;
108+
}
109+
#poweredBy {
110+
text-align: center;
111+
}
112+
#navcolumn img {
113+
margin-top: 10px;
114+
margin-bottom: 3px;
115+
}
116+
#poweredBy img {
117+
display:block;
118+
margin: 20px 0 20px 17px;
119+
}
120+
#search img {
121+
margin: 0px;
122+
display: block;
123+
}
124+
#search #q, #search #btnG {
125+
border: 1px solid #999;
126+
margin-bottom:10px;
127+
}
128+
#search form {
129+
margin: 0px;
130+
}
131+
#lastPublished {
132+
font-size: x-small;
133+
}
134+
.navSection {
135+
margin-bottom: 2px;
136+
padding: 8px;
137+
}
138+
.navSectionHead {
139+
font-weight: bold;
140+
font-size: x-small;
141+
}
142+
.section {
143+
padding: 4px;
144+
}
145+
#footer {
146+
padding: 3px 10px 3px 10px;
147+
font-size: x-small;
148+
}
149+
#breadcrumbs {
150+
font-size: x-small;
151+
margin: 0pt;
152+
}
153+
.source {
154+
padding: 12px;
155+
margin: 1em 7px 1em 7px;
156+
}
157+
.source pre {
158+
margin: 0px;
159+
padding: 0px;
160+
}
161+
#navcolumn img.imageLink, .imageLink {
162+
padding-left: 0px;
163+
padding-bottom: 0px;
164+
padding-top: 0px;
165+
padding-right: 2px;
166+
border: 0px;
167+
margin: 0px;
168+
}

0 commit comments

Comments
 (0)