├── .gitignore
├── APIFinancas.Especificacoes
├── APIFinancas.Especificacoes.csproj
├── APIFinancas.Especificacoes.sln
├── CalculoJurosCompostos.feature
├── CalculoJurosCompostos.feature.cs
├── CalculoJurosCompostosStepDefinition.cs
└── specflow.json
├── APIFinancas
├── .vscode
│ ├── launch.json
│ └── tasks.json
├── APIFinancas.csproj
├── CalculoFinanceiro.cs
├── Controllers
│ └── CalculoFinanceiroController.cs
├── Dockerfile
├── Models
│ ├── Emprestimo.cs
│ └── FalhaCalculo.cs
├── Program.cs
├── Properties
│ └── launchSettings.json
├── Startup.cs
├── appsettings.Development.json
└── appsettings.json
└── manifests
├── deployment.yml
└── service.yml
/.gitignore:
--------------------------------------------------------------------------------
1 | ## Ignore Visual Studio temporary files, build results, and
2 | ## files generated by popular Visual Studio add-ons.
3 | ##
4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
5 |
6 | # User-specific files
7 | *.rsuser
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | # User-specific files (MonoDevelop/Xamarin Studio)
14 | *.userprefs
15 |
16 | # Mono auto generated files
17 | mono_crash.*
18 |
19 | # Build results
20 | [Dd]ebug/
21 | [Dd]ebugPublic/
22 | [Rr]elease/
23 | [Rr]eleases/
24 | x64/
25 | x86/
26 | [Aa][Rr][Mm]/
27 | [Aa][Rr][Mm]64/
28 | bld/
29 | [Bb]in/
30 | [Oo]bj/
31 | [Ll]og/
32 | [Ll]ogs/
33 |
34 | # Visual Studio 2015/2017 cache/options directory
35 | .vs/
36 | # Uncomment if you have tasks that create the project's static files in wwwroot
37 | #wwwroot/
38 |
39 | # Visual Studio 2017 auto generated files
40 | Generated\ Files/
41 |
42 | # MSTest test Results
43 | [Tt]est[Rr]esult*/
44 | [Bb]uild[Ll]og.*
45 |
46 | # NUnit
47 | *.VisualState.xml
48 | TestResult.xml
49 | nunit-*.xml
50 |
51 | # Build Results of an ATL Project
52 | [Dd]ebugPS/
53 | [Rr]eleasePS/
54 | dlldata.c
55 |
56 | # Benchmark Results
57 | BenchmarkDotNet.Artifacts/
58 |
59 | # .NET Core
60 | project.lock.json
61 | project.fragment.lock.json
62 | artifacts/
63 |
64 | # StyleCop
65 | StyleCopReport.xml
66 |
67 | # Files built by Visual Studio
68 | *_i.c
69 | *_p.c
70 | *_h.h
71 | *.ilk
72 | *.meta
73 | *.obj
74 | *.iobj
75 | *.pch
76 | *.pdb
77 | *.ipdb
78 | *.pgc
79 | *.pgd
80 | *.rsp
81 | *.sbr
82 | *.tlb
83 | *.tli
84 | *.tlh
85 | *.tmp
86 | *.tmp_proj
87 | *_wpftmp.csproj
88 | *.log
89 | *.vspscc
90 | *.vssscc
91 | .builds
92 | *.pidb
93 | *.svclog
94 | *.scc
95 |
96 | # Chutzpah Test files
97 | _Chutzpah*
98 |
99 | # Visual C++ cache files
100 | ipch/
101 | *.aps
102 | *.ncb
103 | *.opendb
104 | *.opensdf
105 | *.sdf
106 | *.cachefile
107 | *.VC.db
108 | *.VC.VC.opendb
109 |
110 | # Visual Studio profiler
111 | *.psess
112 | *.vsp
113 | *.vspx
114 | *.sap
115 |
116 | # Visual Studio Trace Files
117 | *.e2e
118 |
119 | # TFS 2012 Local Workspace
120 | $tf/
121 |
122 | # Guidance Automation Toolkit
123 | *.gpState
124 |
125 | # ReSharper is a .NET coding add-in
126 | _ReSharper*/
127 | *.[Rr]e[Ss]harper
128 | *.DotSettings.user
129 |
130 | # TeamCity is a build add-in
131 | _TeamCity*
132 |
133 | # DotCover is a Code Coverage Tool
134 | *.dotCover
135 |
136 | # AxoCover is a Code Coverage Tool
137 | .axoCover/*
138 | !.axoCover/settings.json
139 |
140 | # Visual Studio code coverage results
141 | *.coverage
142 | *.coveragexml
143 |
144 | # NCrunch
145 | _NCrunch_*
146 | .*crunch*.local.xml
147 | nCrunchTemp_*
148 |
149 | # MightyMoose
150 | *.mm.*
151 | AutoTest.Net/
152 |
153 | # Web workbench (sass)
154 | .sass-cache/
155 |
156 | # Installshield output folder
157 | [Ee]xpress/
158 |
159 | # DocProject is a documentation generator add-in
160 | DocProject/buildhelp/
161 | DocProject/Help/*.HxT
162 | DocProject/Help/*.HxC
163 | DocProject/Help/*.hhc
164 | DocProject/Help/*.hhk
165 | DocProject/Help/*.hhp
166 | DocProject/Help/Html2
167 | DocProject/Help/html
168 |
169 | # Click-Once directory
170 | publish/
171 |
172 | # Publish Web Output
173 | *.[Pp]ublish.xml
174 | *.azurePubxml
175 | # Note: Comment the next line if you want to checkin your web deploy settings,
176 | # but database connection strings (with potential passwords) will be unencrypted
177 | *.pubxml
178 | *.publishproj
179 |
180 | # Microsoft Azure Web App publish settings. Comment the next line if you want to
181 | # checkin your Azure Web App publish settings, but sensitive information contained
182 | # in these scripts will be unencrypted
183 | PublishScripts/
184 |
185 | # NuGet Packages
186 | *.nupkg
187 | # NuGet Symbol Packages
188 | *.snupkg
189 | # The packages folder can be ignored because of Package Restore
190 | **/[Pp]ackages/*
191 | # except build/, which is used as an MSBuild target.
192 | !**/[Pp]ackages/build/
193 | # Uncomment if necessary however generally it will be regenerated when needed
194 | #!**/[Pp]ackages/repositories.config
195 | # NuGet v3's project.json files produces more ignorable files
196 | *.nuget.props
197 | *.nuget.targets
198 |
199 | # Microsoft Azure Build Output
200 | csx/
201 | *.build.csdef
202 |
203 | # Microsoft Azure Emulator
204 | ecf/
205 | rcf/
206 |
207 | # Windows Store app package directories and files
208 | AppPackages/
209 | BundleArtifacts/
210 | Package.StoreAssociation.xml
211 | _pkginfo.txt
212 | *.appx
213 | *.appxbundle
214 | *.appxupload
215 |
216 | # Visual Studio cache files
217 | # files ending in .cache can be ignored
218 | *.[Cc]ache
219 | # but keep track of directories ending in .cache
220 | !?*.[Cc]ache/
221 |
222 | # Others
223 | ClientBin/
224 | ~$*
225 | *~
226 | *.dbmdl
227 | *.dbproj.schemaview
228 | *.jfm
229 | *.pfx
230 | *.publishsettings
231 | orleans.codegen.cs
232 |
233 | # Including strong name files can present a security risk
234 | # (https://github.com/github/gitignore/pull/2483#issue-259490424)
235 | #*.snk
236 |
237 | # Since there are multiple workflows, uncomment next line to ignore bower_components
238 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
239 | #bower_components/
240 |
241 | # RIA/Silverlight projects
242 | Generated_Code/
243 |
244 | # Backup & report files from converting an old project file
245 | # to a newer Visual Studio version. Backup files are not needed,
246 | # because we have git ;-)
247 | _UpgradeReport_Files/
248 | Backup*/
249 | UpgradeLog*.XML
250 | UpgradeLog*.htm
251 | ServiceFabricBackup/
252 | *.rptproj.bak
253 |
254 | # SQL Server files
255 | *.mdf
256 | *.ldf
257 | *.ndf
258 |
259 | # Business Intelligence projects
260 | *.rdl.data
261 | *.bim.layout
262 | *.bim_*.settings
263 | *.rptproj.rsuser
264 | *- [Bb]ackup.rdl
265 | *- [Bb]ackup ([0-9]).rdl
266 | *- [Bb]ackup ([0-9][0-9]).rdl
267 |
268 | # Microsoft Fakes
269 | FakesAssemblies/
270 |
271 | # GhostDoc plugin setting file
272 | *.GhostDoc.xml
273 |
274 | # Node.js Tools for Visual Studio
275 | .ntvs_analysis.dat
276 | node_modules/
277 |
278 | # Visual Studio 6 build log
279 | *.plg
280 |
281 | # Visual Studio 6 workspace options file
282 | *.opt
283 |
284 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
285 | *.vbw
286 |
287 | # Visual Studio LightSwitch build output
288 | **/*.HTMLClient/GeneratedArtifacts
289 | **/*.DesktopClient/GeneratedArtifacts
290 | **/*.DesktopClient/ModelManifest.xml
291 | **/*.Server/GeneratedArtifacts
292 | **/*.Server/ModelManifest.xml
293 | _Pvt_Extensions
294 |
295 | # Paket dependency manager
296 | .paket/paket.exe
297 | paket-files/
298 |
299 | # FAKE - F# Make
300 | .fake/
301 |
302 | # CodeRush personal settings
303 | .cr/personal
304 |
305 | # Python Tools for Visual Studio (PTVS)
306 | __pycache__/
307 | *.pyc
308 |
309 | # Cake - Uncomment if you are using it
310 | # tools/**
311 | # !tools/packages.config
312 |
313 | # Tabs Studio
314 | *.tss
315 |
316 | # Telerik's JustMock configuration file
317 | *.jmconfig
318 |
319 | # BizTalk build output
320 | *.btp.cs
321 | *.btm.cs
322 | *.odx.cs
323 | *.xsd.cs
324 |
325 | # OpenCover UI analysis results
326 | OpenCover/
327 |
328 | # Azure Stream Analytics local run output
329 | ASALocalRun/
330 |
331 | # MSBuild Binary and Structured Log
332 | *.binlog
333 |
334 | # NVidia Nsight GPU debugger configuration file
335 | *.nvuser
336 |
337 | # MFractors (Xamarin productivity tool) working folder
338 | .mfractor/
339 |
340 | # Local History for Visual Studio
341 | .localhistory/
342 |
343 | # BeatPulse healthcheck temp database
344 | healthchecksdb
345 |
346 | # Backup folder for Package Reference Convert tool in Visual Studio 2017
347 | MigrationBackup/
348 |
349 | # Ionide (cross platform F# VS Code tools) working folder
350 | .ionide/
351 |
--------------------------------------------------------------------------------
/APIFinancas.Especificacoes/APIFinancas.Especificacoes.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 |
6 | false
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/APIFinancas.Especificacoes/APIFinancas.Especificacoes.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 16
4 | VisualStudioVersion = 16.0.30428.66
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "APIFinancas.Especificacoes", "APIFinancas.Especificacoes.csproj", "{EF016D34-0649-4A15-82D5-7156720BCC3D}"
7 | EndProject
8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "APIFinancas", "..\APIFinancas\APIFinancas.csproj", "{13A45A7B-0B59-4A71-B7AA-068B3601FE15}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Release|Any CPU = Release|Any CPU
14 | EndGlobalSection
15 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
16 | {EF016D34-0649-4A15-82D5-7156720BCC3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
17 | {EF016D34-0649-4A15-82D5-7156720BCC3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
18 | {EF016D34-0649-4A15-82D5-7156720BCC3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
19 | {EF016D34-0649-4A15-82D5-7156720BCC3D}.Release|Any CPU.Build.0 = Release|Any CPU
20 | {13A45A7B-0B59-4A71-B7AA-068B3601FE15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {13A45A7B-0B59-4A71-B7AA-068B3601FE15}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {13A45A7B-0B59-4A71-B7AA-068B3601FE15}.Release|Any CPU.ActiveCfg = Release|Any CPU
23 | {13A45A7B-0B59-4A71-B7AA-068B3601FE15}.Release|Any CPU.Build.0 = Release|Any CPU
24 | EndGlobalSection
25 | GlobalSection(SolutionProperties) = preSolution
26 | HideSolutionNode = FALSE
27 | EndGlobalSection
28 | GlobalSection(ExtensibilityGlobals) = postSolution
29 | SolutionGuid = {BF3DD135-B09C-4C8D-94E7-4F3417953856}
30 | EndGlobalSection
31 | EndGlobal
32 |
--------------------------------------------------------------------------------
/APIFinancas.Especificacoes/CalculoJurosCompostos.feature:
--------------------------------------------------------------------------------
1 | Funcionalidade: Cálculo de Juros Compostos
2 |
3 | Cenário: SimulacaoJurosCompostos01
4 | Dado que o valor o valor do empréstimo é de R$ 10.000,00
5 | E que este empréstimo será por 12 meses
6 | E que a taxa de juros é de 2,00% ao mês
7 | Quando eu solicitar o cálculo do valor total a ser pago ao final do período
8 | Então o resultado será 12.682,42
9 |
10 | Cenário: SimulacaoJurosCompostos02
11 | Dado que o valor o valor do empréstimo é de R$ 11.937,28
12 | E que este empréstimo será por 24 meses
13 | E que a taxa de juros é de 4,00% ao mês
14 | Quando eu solicitar o cálculo do valor total a ser pago ao final do período
15 | Então o resultado será 30.598,88
16 |
17 | Cenário: SimulacaoJurosCompostos03
18 | Dado que o valor o valor do empréstimo é de R$ 15.000,00
19 | E que este empréstimo será por 36 meses
20 | E que a taxa de juros é de 6,00% ao mês
21 | Quando eu solicitar o cálculo do valor total a ser pago ao final do período
22 | Então o resultado será 122.208,78
23 |
24 | Cenário: SimulacaoJurosCompostos04
25 | Dado que o valor o valor do empréstimo é de R$ 20.000,00
26 | E que este empréstimo será por 36 meses
27 | E que a taxa de juros é de 6,00% ao mês
28 | Quando eu solicitar o cálculo do valor total a ser pago ao final do período
29 | Então o resultado será 162.945,04
30 |
31 | Cenário: SimulacaoJurosCompostos05
32 | Dado que o valor o valor do empréstimo é de R$ 25.000,00
33 | E que este empréstimo será por 48 meses
34 | E que a taxa de juros é de 6,00% ao mês
35 | Quando eu solicitar o cálculo do valor total a ser pago ao final do período
36 | Então o resultado será 409.846,79
37 |
--------------------------------------------------------------------------------
/APIFinancas.Especificacoes/CalculoJurosCompostos.feature.cs:
--------------------------------------------------------------------------------
1 | // ------------------------------------------------------------------------------
2 | //
3 | // This code was generated by SpecFlow (https://www.specflow.org/).
4 | // SpecFlow Version:3.4.0.0
5 | // SpecFlow Generator Version:3.4.0.0
6 | //
7 | // Changes to this file may cause incorrect behavior and will be lost if
8 | // the code is regenerated.
9 | //
10 | // ------------------------------------------------------------------------------
11 | #region Designer generated code
12 | #pragma warning disable
13 | namespace APIFinancas.Especificacoes
14 | {
15 | using TechTalk.SpecFlow;
16 | using System;
17 | using System.Linq;
18 |
19 |
20 | [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.4.0.0")]
21 | [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
22 | public partial class CalculoDeJurosCompostosFeature : object, Xunit.IClassFixture, System.IDisposable
23 | {
24 |
25 | private static TechTalk.SpecFlow.ITestRunner testRunner;
26 |
27 | private string[] _featureTags = ((string[])(null));
28 |
29 | private Xunit.Abstractions.ITestOutputHelper _testOutputHelper;
30 |
31 | #line 1 "CalculoJurosCompostos.feature"
32 | #line hidden
33 |
34 | public CalculoDeJurosCompostosFeature(CalculoDeJurosCompostosFeature.FixtureData fixtureData, APIFinancas_Especificacoes_XUnitAssemblyFixture assemblyFixture, Xunit.Abstractions.ITestOutputHelper testOutputHelper)
35 | {
36 | this._testOutputHelper = testOutputHelper;
37 | this.TestInitialize();
38 | }
39 |
40 | public static void FeatureSetup()
41 | {
42 | testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
43 | TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("pt-BR"), "", "Cálculo de Juros Compostos", null, ProgrammingLanguage.CSharp, ((string[])(null)));
44 | testRunner.OnFeatureStart(featureInfo);
45 | }
46 |
47 | public static void FeatureTearDown()
48 | {
49 | testRunner.OnFeatureEnd();
50 | testRunner = null;
51 | }
52 |
53 | public virtual void TestInitialize()
54 | {
55 | }
56 |
57 | public virtual void TestTearDown()
58 | {
59 | testRunner.OnScenarioEnd();
60 | }
61 |
62 | public virtual void ScenarioInitialize(TechTalk.SpecFlow.ScenarioInfo scenarioInfo)
63 | {
64 | testRunner.OnScenarioInitialize(scenarioInfo);
65 | testRunner.ScenarioContext.ScenarioContainer.RegisterInstanceAs(_testOutputHelper);
66 | }
67 |
68 | public virtual void ScenarioStart()
69 | {
70 | testRunner.OnScenarioStart();
71 | }
72 |
73 | public virtual void ScenarioCleanup()
74 | {
75 | testRunner.CollectScenarioErrors();
76 | }
77 |
78 | void System.IDisposable.Dispose()
79 | {
80 | this.TestTearDown();
81 | }
82 |
83 | [Xunit.SkippableFactAttribute(DisplayName="SimulacaoJurosCompostos01")]
84 | [Xunit.TraitAttribute("FeatureTitle", "Cálculo de Juros Compostos")]
85 | [Xunit.TraitAttribute("Description", "SimulacaoJurosCompostos01")]
86 | public virtual void SimulacaoJurosCompostos01()
87 | {
88 | string[] tagsOfScenario = ((string[])(null));
89 | System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
90 | TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("SimulacaoJurosCompostos01", null, tagsOfScenario, argumentsOfScenario);
91 | #line 3
92 | this.ScenarioInitialize(scenarioInfo);
93 | #line hidden
94 | bool isScenarioIgnored = default(bool);
95 | bool isFeatureIgnored = default(bool);
96 | if ((tagsOfScenario != null))
97 | {
98 | isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any();
99 | }
100 | if ((this._featureTags != null))
101 | {
102 | isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any();
103 | }
104 | if ((isScenarioIgnored || isFeatureIgnored))
105 | {
106 | testRunner.SkipScenario();
107 | }
108 | else
109 | {
110 | this.ScenarioStart();
111 | #line 4
112 | testRunner.Given("que o valor o valor do empréstimo é de R$ 10.000,00", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Dado ");
113 | #line hidden
114 | #line 5
115 | testRunner.And("que este empréstimo será por 12 meses", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "E ");
116 | #line hidden
117 | #line 6
118 | testRunner.And("que a taxa de juros é de 2,00% ao mês", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "E ");
119 | #line hidden
120 | #line 7
121 | testRunner.When("eu solicitar o cálculo do valor total a ser pago ao final do período", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Quando ");
122 | #line hidden
123 | #line 8
124 | testRunner.Then("o resultado será 12.682,42", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Então ");
125 | #line hidden
126 | }
127 | this.ScenarioCleanup();
128 | }
129 |
130 | [Xunit.SkippableFactAttribute(DisplayName="SimulacaoJurosCompostos02")]
131 | [Xunit.TraitAttribute("FeatureTitle", "Cálculo de Juros Compostos")]
132 | [Xunit.TraitAttribute("Description", "SimulacaoJurosCompostos02")]
133 | public virtual void SimulacaoJurosCompostos02()
134 | {
135 | string[] tagsOfScenario = ((string[])(null));
136 | System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
137 | TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("SimulacaoJurosCompostos02", null, tagsOfScenario, argumentsOfScenario);
138 | #line 10
139 | this.ScenarioInitialize(scenarioInfo);
140 | #line hidden
141 | bool isScenarioIgnored = default(bool);
142 | bool isFeatureIgnored = default(bool);
143 | if ((tagsOfScenario != null))
144 | {
145 | isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any();
146 | }
147 | if ((this._featureTags != null))
148 | {
149 | isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any();
150 | }
151 | if ((isScenarioIgnored || isFeatureIgnored))
152 | {
153 | testRunner.SkipScenario();
154 | }
155 | else
156 | {
157 | this.ScenarioStart();
158 | #line 11
159 | testRunner.Given("que o valor o valor do empréstimo é de R$ 11.937,28", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Dado ");
160 | #line hidden
161 | #line 12
162 | testRunner.And("que este empréstimo será por 24 meses", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "E ");
163 | #line hidden
164 | #line 13
165 | testRunner.And("que a taxa de juros é de 4,00% ao mês", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "E ");
166 | #line hidden
167 | #line 14
168 | testRunner.When("eu solicitar o cálculo do valor total a ser pago ao final do período", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Quando ");
169 | #line hidden
170 | #line 15
171 | testRunner.Then("o resultado será 30.598,88", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Então ");
172 | #line hidden
173 | }
174 | this.ScenarioCleanup();
175 | }
176 |
177 | [Xunit.SkippableFactAttribute(DisplayName="SimulacaoJurosCompostos03")]
178 | [Xunit.TraitAttribute("FeatureTitle", "Cálculo de Juros Compostos")]
179 | [Xunit.TraitAttribute("Description", "SimulacaoJurosCompostos03")]
180 | public virtual void SimulacaoJurosCompostos03()
181 | {
182 | string[] tagsOfScenario = ((string[])(null));
183 | System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
184 | TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("SimulacaoJurosCompostos03", null, tagsOfScenario, argumentsOfScenario);
185 | #line 17
186 | this.ScenarioInitialize(scenarioInfo);
187 | #line hidden
188 | bool isScenarioIgnored = default(bool);
189 | bool isFeatureIgnored = default(bool);
190 | if ((tagsOfScenario != null))
191 | {
192 | isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any();
193 | }
194 | if ((this._featureTags != null))
195 | {
196 | isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any();
197 | }
198 | if ((isScenarioIgnored || isFeatureIgnored))
199 | {
200 | testRunner.SkipScenario();
201 | }
202 | else
203 | {
204 | this.ScenarioStart();
205 | #line 18
206 | testRunner.Given("que o valor o valor do empréstimo é de R$ 15.000,00", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Dado ");
207 | #line hidden
208 | #line 19
209 | testRunner.And("que este empréstimo será por 36 meses", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "E ");
210 | #line hidden
211 | #line 20
212 | testRunner.And("que a taxa de juros é de 6,00% ao mês", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "E ");
213 | #line hidden
214 | #line 21
215 | testRunner.When("eu solicitar o cálculo do valor total a ser pago ao final do período", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Quando ");
216 | #line hidden
217 | #line 22
218 | testRunner.Then("o resultado será 122.208,78", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Então ");
219 | #line hidden
220 | }
221 | this.ScenarioCleanup();
222 | }
223 |
224 | [Xunit.SkippableFactAttribute(DisplayName="SimulacaoJurosCompostos04")]
225 | [Xunit.TraitAttribute("FeatureTitle", "Cálculo de Juros Compostos")]
226 | [Xunit.TraitAttribute("Description", "SimulacaoJurosCompostos04")]
227 | public virtual void SimulacaoJurosCompostos04()
228 | {
229 | string[] tagsOfScenario = ((string[])(null));
230 | System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
231 | TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("SimulacaoJurosCompostos04", null, tagsOfScenario, argumentsOfScenario);
232 | #line 24
233 | this.ScenarioInitialize(scenarioInfo);
234 | #line hidden
235 | bool isScenarioIgnored = default(bool);
236 | bool isFeatureIgnored = default(bool);
237 | if ((tagsOfScenario != null))
238 | {
239 | isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any();
240 | }
241 | if ((this._featureTags != null))
242 | {
243 | isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any();
244 | }
245 | if ((isScenarioIgnored || isFeatureIgnored))
246 | {
247 | testRunner.SkipScenario();
248 | }
249 | else
250 | {
251 | this.ScenarioStart();
252 | #line 25
253 | testRunner.Given("que o valor o valor do empréstimo é de R$ 20.000,00", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Dado ");
254 | #line hidden
255 | #line 26
256 | testRunner.And("que este empréstimo será por 36 meses", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "E ");
257 | #line hidden
258 | #line 27
259 | testRunner.And("que a taxa de juros é de 6,00% ao mês", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "E ");
260 | #line hidden
261 | #line 28
262 | testRunner.When("eu solicitar o cálculo do valor total a ser pago ao final do período", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Quando ");
263 | #line hidden
264 | #line 29
265 | testRunner.Then("o resultado será 162.945,04", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Então ");
266 | #line hidden
267 | }
268 | this.ScenarioCleanup();
269 | }
270 |
271 | [Xunit.SkippableFactAttribute(DisplayName="SimulacaoJurosCompostos05")]
272 | [Xunit.TraitAttribute("FeatureTitle", "Cálculo de Juros Compostos")]
273 | [Xunit.TraitAttribute("Description", "SimulacaoJurosCompostos05")]
274 | public virtual void SimulacaoJurosCompostos05()
275 | {
276 | string[] tagsOfScenario = ((string[])(null));
277 | System.Collections.Specialized.OrderedDictionary argumentsOfScenario = new System.Collections.Specialized.OrderedDictionary();
278 | TechTalk.SpecFlow.ScenarioInfo scenarioInfo = new TechTalk.SpecFlow.ScenarioInfo("SimulacaoJurosCompostos05", null, tagsOfScenario, argumentsOfScenario);
279 | #line 31
280 | this.ScenarioInitialize(scenarioInfo);
281 | #line hidden
282 | bool isScenarioIgnored = default(bool);
283 | bool isFeatureIgnored = default(bool);
284 | if ((tagsOfScenario != null))
285 | {
286 | isScenarioIgnored = tagsOfScenario.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any();
287 | }
288 | if ((this._featureTags != null))
289 | {
290 | isFeatureIgnored = this._featureTags.Where(__entry => __entry != null).Where(__entry => String.Equals(__entry, "ignore", StringComparison.CurrentCultureIgnoreCase)).Any();
291 | }
292 | if ((isScenarioIgnored || isFeatureIgnored))
293 | {
294 | testRunner.SkipScenario();
295 | }
296 | else
297 | {
298 | this.ScenarioStart();
299 | #line 32
300 | testRunner.Given("que o valor o valor do empréstimo é de R$ 25.000,00", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Dado ");
301 | #line hidden
302 | #line 33
303 | testRunner.And("que este empréstimo será por 48 meses", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "E ");
304 | #line hidden
305 | #line 34
306 | testRunner.And("que a taxa de juros é de 6,00% ao mês", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "E ");
307 | #line hidden
308 | #line 35
309 | testRunner.When("eu solicitar o cálculo do valor total a ser pago ao final do período", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Quando ");
310 | #line hidden
311 | #line 36
312 | testRunner.Then("o resultado será 409.846,79", ((string)(null)), ((TechTalk.SpecFlow.Table)(null)), "Então ");
313 | #line hidden
314 | }
315 | this.ScenarioCleanup();
316 | }
317 |
318 | [System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "3.4.0.0")]
319 | [System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
320 | public class FixtureData : System.IDisposable
321 | {
322 |
323 | public FixtureData()
324 | {
325 | CalculoDeJurosCompostosFeature.FeatureSetup();
326 | }
327 |
328 | void System.IDisposable.Dispose()
329 | {
330 | CalculoDeJurosCompostosFeature.FeatureTearDown();
331 | }
332 | }
333 | }
334 | }
335 | #pragma warning restore
336 | #endregion
337 |
--------------------------------------------------------------------------------
/APIFinancas.Especificacoes/CalculoJurosCompostosStepDefinition.cs:
--------------------------------------------------------------------------------
1 | using Xunit;
2 | using TechTalk.SpecFlow;
3 |
4 | namespace APIFinancas.Especificacoes
5 | {
6 | [Binding]
7 | public class CalculoJurosCompostosStepDefinition
8 | {
9 | private double _valorEmprestimo;
10 | private int _numMeses;
11 | private double _percTaxa;
12 | private double _valorCalculado;
13 |
14 | [Given(@"que o valor o valor do empréstimo é de R\$ (.*)")]
15 | public void PreencherValorEmprestimo(double valorEmprestimo)
16 | {
17 | _valorEmprestimo = valorEmprestimo;
18 | }
19 |
20 | [Given(@"que este empréstimo será por (.*) meses")]
21 | public void PreencherNumeroMeses(int numMeses)
22 | {
23 | _numMeses = numMeses;
24 | }
25 |
26 | [Given(@"que a taxa de juros é de (.*)% ao mês")]
27 | public void PreencherPercentualTaxa(double percTaxa)
28 | {
29 | _percTaxa = percTaxa;
30 | }
31 |
32 | [When(@"eu solicitar o cálculo do valor total a ser pago ao final do período")]
33 | public void ProcessarCalculoJurosCompostos()
34 | {
35 | _valorCalculado = CalculoFinanceiro
36 | .CalcularValorComJurosCompostos(
37 | _valorEmprestimo, _numMeses, _percTaxa);
38 | }
39 |
40 | [Then(@"o resultado será (.*)")]
41 | public void ValidarResultado(double valorFinalEmprestimo)
42 | {
43 | Assert.Equal(valorFinalEmprestimo, _valorCalculado);
44 | }
45 | }
46 | }
--------------------------------------------------------------------------------
/APIFinancas.Especificacoes/specflow.json:
--------------------------------------------------------------------------------
1 | {
2 | "language": {
3 | "feature": "pt-BR"
4 | }
5 | }
--------------------------------------------------------------------------------
/APIFinancas/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to find out which attributes exist for C# debugging
3 | // Use hover for the description of the existing attributes
4 | // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": ".NET Core Launch (web)",
9 | "type": "coreclr",
10 | "request": "launch",
11 | "preLaunchTask": "build",
12 | "program": "${workspaceFolder}/bin/Debug/netcoreapp3.1/APIFinancas.dll",
13 | "args": [],
14 | "cwd": "${workspaceFolder}",
15 | "stopAtEntry": false,
16 | "serverReadyAction": {
17 | "action": "openExternally",
18 | "pattern": "\\bNow listening on:\\s+(https?://\\S+)"
19 | },
20 | "env": {
21 | "ASPNETCORE_ENVIRONMENT": "Development"
22 | },
23 | "sourceFileMap": {
24 | "/Views": "${workspaceFolder}/Views"
25 | }
26 | },
27 | {
28 | "name": ".NET Core Attach",
29 | "type": "coreclr",
30 | "request": "attach",
31 | "processId": "${command:pickProcess}"
32 | },
33 | {
34 | "name": "Local Process with Kubernetes",
35 | "type": "local-process-with-kubernetes.configuration",
36 | "request": "launch"
37 | }
38 | ]
39 | }
--------------------------------------------------------------------------------
/APIFinancas/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "2.0.0",
3 | "tasks": [
4 | {
5 | "label": "build",
6 | "command": "dotnet",
7 | "type": "process",
8 | "args": [
9 | "build",
10 | "${workspaceFolder}/APIFinancas.csproj",
11 | "/property:GenerateFullPaths=true",
12 | "/consoleloggerparameters:NoSummary"
13 | ],
14 | "problemMatcher": "$msCompile"
15 | },
16 | {
17 | "label": "publish",
18 | "command": "dotnet",
19 | "type": "process",
20 | "args": [
21 | "publish",
22 | "${workspaceFolder}/APIFinancas.csproj",
23 | "/property:GenerateFullPaths=true",
24 | "/consoleloggerparameters:NoSummary"
25 | ],
26 | "problemMatcher": "$msCompile"
27 | },
28 | {
29 | "label": "watch",
30 | "command": "dotnet",
31 | "type": "process",
32 | "args": [
33 | "watch",
34 | "run",
35 | "${workspaceFolder}/APIFinancas.csproj",
36 | "/property:GenerateFullPaths=true",
37 | "/consoleloggerparameters:NoSummary"
38 | ],
39 | "problemMatcher": "$msCompile"
40 | }
41 | ]
42 | }
--------------------------------------------------------------------------------
/APIFinancas/APIFinancas.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/APIFinancas/CalculoFinanceiro.cs:
--------------------------------------------------------------------------------
1 |
2 | using System;
3 |
4 | namespace APIFinancas
5 | {
6 | public static class CalculoFinanceiro
7 | {
8 | public static double CalcularValorComJurosCompostos(
9 | double valorEmprestimo, int numMeses, double percTaxa)
10 | {
11 | return valorEmprestimo * Math.Pow(1 + (percTaxa / 100), numMeses); // Simulação de falha
12 | //return Math.Round(
13 | // valorEmprestimo * Math.Pow(1 + (percTaxa / 100), numMeses), 2);
14 | }
15 | }
16 | }
--------------------------------------------------------------------------------
/APIFinancas/Controllers/CalculoFinanceiroController.cs:
--------------------------------------------------------------------------------
1 | using System.Net;
2 | using Microsoft.AspNetCore.Mvc;
3 | using Microsoft.Extensions.Logging;
4 | using APIFinancas.Models;
5 |
6 | namespace APIFinancas.Controllers
7 | {
8 | [ApiController]
9 | [Route("[controller]")]
10 | public class CalculoFinanceiroController : ControllerBase
11 | {
12 |
13 | [HttpGet("juroscompostos")]
14 | [ProducesResponseType(typeof(Emprestimo), (int)HttpStatusCode.OK)]
15 | [ProducesResponseType(typeof(FalhaCalculo), (int)HttpStatusCode.BadRequest)]
16 | public ActionResult Get(
17 | [FromServices]ILogger logger,
18 | double valorEmprestimo, int numMeses, double percTaxa)
19 | {
20 | if (valorEmprestimo <= 0)
21 | return new BadRequestObjectResult(new FalhaCalculo() { Mensagem = "O Valor do Empréstimo deve ser maior do que zero!" });
22 |
23 | if (numMeses <= 0)
24 | return new BadRequestObjectResult(new FalhaCalculo() { Mensagem = "O Número de Meses deve ser maior do que zero!" });
25 |
26 | if (percTaxa <= 0)
27 | return new BadRequestObjectResult(new FalhaCalculo() { Mensagem = "O Percentual da Taxa de Juros deve ser maior do que zero!" });
28 |
29 | logger.LogInformation(
30 | "Recebida nova requisição|" +
31 | $"Valor do empréstimo: {valorEmprestimo}|" +
32 | $"Número de meses: {numMeses}|" +
33 | $"% Taxa de Juros: {percTaxa}");
34 |
35 | double valorFinalJuros =
36 | CalculoFinanceiro.CalcularValorComJurosCompostos(
37 | valorEmprestimo, numMeses, percTaxa);
38 | logger.LogInformation($"Valor Final com Juros: {valorFinalJuros}");
39 |
40 | return new Emprestimo()
41 | {
42 | ValorEmprestimo = valorEmprestimo,
43 | NumMeses = numMeses,
44 | TaxaPercentual = percTaxa,
45 | ValorFinalComJuros = valorFinalJuros
46 | };
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/APIFinancas/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
2 | WORKDIR /app
3 |
4 | # Exibir a versão do .NET Core
5 | RUN dotnet --version
6 |
7 | # Copiar csproj e restaurar dependencias
8 | COPY *.csproj ./
9 | RUN dotnet restore
10 |
11 | # Build da aplicacao
12 | COPY . ./
13 | RUN dotnet publish -c Release -o out
14 |
15 | # Build da imagem
16 | FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
17 | WORKDIR /app
18 | COPY --from=build-env /app/out .
19 | ENTRYPOINT ["dotnet", "APIFinancas.dll"]
--------------------------------------------------------------------------------
/APIFinancas/Models/Emprestimo.cs:
--------------------------------------------------------------------------------
1 | namespace APIFinancas.Models
2 | {
3 | public class Emprestimo
4 | {
5 | public double ValorEmprestimo { get; set; }
6 | public int NumMeses { get; set; }
7 | public double TaxaPercentual { get; set; }
8 | public double ValorFinalComJuros { get; set; }
9 | }
10 | }
--------------------------------------------------------------------------------
/APIFinancas/Models/FalhaCalculo.cs:
--------------------------------------------------------------------------------
1 | namespace APIFinancas.Models
2 | {
3 | public class FalhaCalculo
4 | {
5 | public bool Erro => true;
6 | public string Mensagem { get; set; }
7 | }
8 | }
--------------------------------------------------------------------------------
/APIFinancas/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Hosting;
6 | using Microsoft.Extensions.Configuration;
7 | using Microsoft.Extensions.Hosting;
8 | using Microsoft.Extensions.Logging;
9 |
10 | namespace APIFinancas
11 | {
12 | public class Program
13 | {
14 | public static void Main(string[] args)
15 | {
16 | CreateHostBuilder(args).Build().Run();
17 | }
18 |
19 | public static IHostBuilder CreateHostBuilder(string[] args) =>
20 | Host.CreateDefaultBuilder(args)
21 | .ConfigureWebHostDefaults(webBuilder =>
22 | {
23 | webBuilder.UseStartup();
24 | });
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/APIFinancas/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/launchsettings.json",
3 | "iisSettings": {
4 | "windowsAuthentication": false,
5 | "anonymousAuthentication": true,
6 | "iisExpress": {
7 | "applicationUrl": "http://localhost:28017",
8 | "sslPort": 44396
9 | }
10 | },
11 | "profiles": {
12 | "IIS Express": {
13 | "commandName": "IISExpress",
14 | "launchBrowser": true,
15 | "launchUrl": "weatherforecast",
16 | "environmentVariables": {
17 | "ASPNETCORE_ENVIRONMENT": "Development"
18 | }
19 | },
20 | "APIFinancas": {
21 | "commandName": "Project",
22 | "launchBrowser": true,
23 | "launchUrl": "weatherforecast",
24 | "applicationUrl": "https://localhost:5001;http://localhost:5000",
25 | "environmentVariables": {
26 | "ASPNETCORE_ENVIRONMENT": "Development"
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/APIFinancas/Startup.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Microsoft.AspNetCore.Builder;
3 | using Microsoft.AspNetCore.Hosting;
4 | using Microsoft.Extensions.Configuration;
5 | using Microsoft.Extensions.DependencyInjection;
6 | using Microsoft.Extensions.Hosting;
7 | using Microsoft.OpenApi.Models;
8 |
9 | namespace APIFinancas
10 | {
11 | public class Startup
12 | {
13 | public Startup(IConfiguration configuration)
14 | {
15 | Configuration = configuration;
16 | }
17 |
18 | public IConfiguration Configuration { get; }
19 |
20 | public void ConfigureServices(IServiceCollection services)
21 | {
22 | services.AddControllers();
23 |
24 | services.AddSwaggerGen(c => {
25 |
26 | c.SwaggerDoc("v1",
27 | new OpenApiInfo
28 | {
29 | Title = "Juros Compostos",
30 | Version = "v1",
31 | Description = $"Instância: {Environment.MachineName} | Exemplo de API REST criada com o ASP.NET Core 3.1 para cálculo de juros compostos/empréstimos",
32 | Contact = new OpenApiContact
33 | {
34 | Name = "Renato Groffe",
35 | Url = new Uri("https://github.com/renatogroffe")
36 | }
37 | });
38 | });
39 |
40 | services.AddApplicationInsightsTelemetry(Configuration);
41 | }
42 |
43 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
44 | {
45 | if (env.IsDevelopment())
46 | {
47 | app.UseDeveloperExceptionPage();
48 | }
49 |
50 | app.UseCors(builder => builder.AllowAnyMethod()
51 | .AllowAnyOrigin()
52 | .AllowAnyHeader());
53 |
54 | app.UseSwagger();
55 | app.UseSwaggerUI(c => {
56 | c.SwaggerEndpoint("/swagger/v1/swagger.json", "Cálculo de Juros Compostos");
57 | c.RoutePrefix = string.Empty;
58 | });
59 |
60 | app.UseHttpsRedirection();
61 |
62 | app.UseRouting();
63 |
64 | app.UseAuthorization();
65 |
66 | app.UseEndpoints(endpoints =>
67 | {
68 | endpoints.MapControllers();
69 | });
70 | }
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/APIFinancas/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Information",
5 | "Microsoft": "Warning",
6 | "Microsoft.Hosting.Lifetime": "Information"
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/APIFinancas/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "ApplicationInsights": {
3 | "InstrumentationKey": ""
4 | },
5 | "Logging": {
6 | "LogLevel": {
7 | "Default": "Information",
8 | "Microsoft": "Warning",
9 | "Microsoft.Hosting.Lifetime": "Information"
10 | }
11 | },
12 | "AllowedHosts": "*"
13 | }
14 |
--------------------------------------------------------------------------------
/manifests/deployment.yml:
--------------------------------------------------------------------------------
1 | apiVersion : apps/v1
2 | kind: Deployment
3 | metadata:
4 | name: apifinancask8s
5 | spec:
6 | replicas: 4
7 | selector:
8 | matchLabels:
9 | app: apifinancask8s
10 | template:
11 | metadata:
12 | labels:
13 | app: apifinancask8s
14 | spec:
15 | containers:
16 | - name: apifinancask8s
17 | image: groffegithubactions.azurecr.io/apifinancask8s
18 | ports:
19 | - containerPort: 80
--------------------------------------------------------------------------------
/manifests/service.yml:
--------------------------------------------------------------------------------
1 | apiVersion: v1
2 | kind: Service
3 | metadata:
4 | name: apifinancask8s
5 | spec:
6 | type: LoadBalancer
7 | ports:
8 | - port: 80
9 | selector:
10 | app: apifinancask8s
--------------------------------------------------------------------------------