Commit a5e0703b authored by Leko Luka - S1710307075's avatar Leko Luka - S1710307075
Browse files

afoch iah text

parent 609aead4

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
MinimumVisualStudioVersion = 15.0.26124.0
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FibonacciSeries", "FibonacciSeries\FibonacciSeries.csproj", "{117309B9-AAC2-4966-A59D-B77ACA0F1761}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{117309B9-AAC2-4966-A59D-B77ACA0F1761}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{117309B9-AAC2-4966-A59D-B77ACA0F1761}.Debug|Any CPU.Build.0 = Debug|Any CPU
{117309B9-AAC2-4966-A59D-B77ACA0F1761}.Debug|x64.ActiveCfg = Debug|Any CPU
{117309B9-AAC2-4966-A59D-B77ACA0F1761}.Debug|x64.Build.0 = Debug|Any CPU
{117309B9-AAC2-4966-A59D-B77ACA0F1761}.Debug|x86.ActiveCfg = Debug|Any CPU
{117309B9-AAC2-4966-A59D-B77ACA0F1761}.Debug|x86.Build.0 = Debug|Any CPU
{117309B9-AAC2-4966-A59D-B77ACA0F1761}.Release|Any CPU.ActiveCfg = Release|Any CPU
{117309B9-AAC2-4966-A59D-B77ACA0F1761}.Release|Any CPU.Build.0 = Release|Any CPU
{117309B9-AAC2-4966-A59D-B77ACA0F1761}.Release|x64.ActiveCfg = Release|Any CPU
{117309B9-AAC2-4966-A59D-B77ACA0F1761}.Release|x64.Build.0 = Release|Any CPU
{117309B9-AAC2-4966-A59D-B77ACA0F1761}.Release|x86.ActiveCfg = Release|Any CPU
{117309B9-AAC2-4966-A59D-B77ACA0F1761}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.1</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FibonacciSeries\FibonacciSeries.csproj" />
</ItemGroup>
</Project>
using Xunit;
namespace FibonacciSeries.Test {
public class FibonacciTest {
[Fact]
public void Test() {
var fib = Fibonacci.CreateSeries(6);
Assert.Equal(new[] { 0, 1, 1, 2, 3, 5 }, fib);
}
}
}
namespace FibonacciSeries {
public class Fibonacci {
public static int[] CreateSeries(int count) {
int[] fibonacci = new int[count];
fibonacci[0] = 0;
fibonacci[1] = 1;
for (int i = 2; i < count; i++) {
fibonacci[i] = fibonacci[i - 1] + fibonacci[i - 2];
}
return fibonacci;
}
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
</Project>
using System;
namespace FibonacciSeries {
class Program {
static void Main(string[] args) {
int count = 5;
if (args.Length == 1)
int.TryParse(args[0], out count);
int[] fibonacci = Fibonacci.CreateSeries(count);
for (int i = 0; i < fibonacci.Length; i++) {
Console.Out.Write(fibonacci[i]);
Console.Out.Write(" ");
}
Console.Out.WriteLine();
}
}
}
# GitLabRunnerEX
# FibonacciNumbers
## Build
```dotnet build```
## Run Fibonacci Series
```dotnet run -p ./FibonacciSeries/```
\ No newline at end of file
stages:
- build
- test
- run
build:
stage: build
script:
- "dotnet build"
artifacts:
paths:
- FibonacciSeries/bin/
test:
stage: test
script:
- "dotnet test ./FibonacciSeries.Test/"
run:
stage: run
script:
- "dotnet run --no-build -p ./FibonacciSeries/"
run-42:
stage: run
script:
- "dotnet run --no-build -p ./FibonacciSeries/ 42"
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment