Skip to content

Commit

Permalink
Merge pull request #21 from caraplana1/dev
Browse files Browse the repository at this point in the history
Updating Dependecies
  • Loading branch information
caraplana1 authored May 23, 2024
2 parents fc6b3be + 333769c commit b24bd40
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
Expand Down
4 changes: 2 additions & 2 deletions ComicConverter/ComicConverter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<RepositoryUrl>https://github.com/caraplana1/ComicConverter</RepositoryUrl>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="PdfSharpCore" Version="1.3.10"/>
<PackageReference Include="SharpCompress" Version="0.30.1"/>
<PackageReference Include="PdfSharpCore" Version="1.3.63" />
<PackageReference Include="SharpCompress" Version="0.37.2" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion Tests/ComicCreators/CbtFiles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public void CreateCbt()
[Fact]
public void ImagesNotFound()
{
string[] fakeFiles = { "fakefile1.jpg", "fakefile2.jpg", "fakefile3.jpg" };
string[] fakeFiles = ["fakefile1.jpg", "fakefile2.jpg", "fakefile3.jpg"];

Assert.Throws<IOException>(() => ComicBuilder.CreateCBT(fakeFiles, cbtPath));
}
Expand Down
8 changes: 4 additions & 4 deletions Tests/ComicCreators/CbzFiles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ public void CreateCbz()
File.Delete($"{cbzPath}.cbz");
}

[Fact]
public void ImagesNotFound()
{
string[] files = { "Fakename", "fakename2", "fakename3" };
[Fact]
public void ImagesNotFound()
{
string[] files = ["Fakename", "fakename2", "fakename3"];

Assert.Throws<IOException>(() => ComicBuilder.CreateCBZ(files, cbzPath));
}
Expand Down
10 changes: 4 additions & 6 deletions Tests/ComicCreators/PdfFiles.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using Xunit;
using System;
using System.Linq;
using System.Collections.Generic;
using System.IO;
using ComicConverter;

Expand All @@ -21,11 +19,11 @@ public void CreatePdf()
File.Delete("pdftest.pdf");
}

[Fact]
[Fact]
public void FilesAreNotImages()
{
var images = Directory.GetFiles(Samples.IMAGESDIR);
images = images.ToList().Append(Samples.FAKEIMAGE).ToArray();
{
var images = Directory.GetFiles(Samples.IMAGESDIR);
images = [.. images, Samples.FAKEIMAGE];

Assert.ThrowsAny<Exception>(() => ComicBuilder.CreatePdf(images, "pdftest"));
}
Expand Down
3 changes: 1 addition & 2 deletions Tests/ImageCollectors/CbrFiles.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Xunit;
using System.IO;
using System.Linq;
using ComicConverter;
using System.Collections.Generic;

Expand Down Expand Up @@ -40,7 +39,7 @@ public void EmptyAttributeDirectory()
ImageExtractors.UnRar(Samples.CBRPATH, "Folder");
ImageExtractors.UnRar(Samples.CBRPATH);

List<string> filesExtracted = Directory.GetFiles(".").ToList<string>();
List<string> filesExtracted = [.. Directory.GetFiles(".")];

foreach (var file in Directory.GetFiles("Folder"))
{
Expand Down
1 change: 0 additions & 1 deletion Tests/ImageCollectors/CbtFiles.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.IO;
using System;
using System.Collections.Generic;
using System.Linq;
using ComicConverter;
using Xunit;
Expand Down
3 changes: 1 addition & 2 deletions Tests/ImageCollectors/CbzFiles.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using Xunit;
using System.IO;
using System.Linq;
using ComicConverter;
using System.Collections.Generic;

Expand Down Expand Up @@ -45,7 +44,7 @@ public void EmptyAttributeDirectory()
ImageExtractors.UnZip(Samples.CBZPATH, folderToCompare);

// Get a list of all files in current directory
List<string> filesExtracted = Directory.GetFiles(".").ToList<string>();
List<string> filesExtracted = [.. Directory.GetFiles(".")];

foreach (var file in Directory.GetFiles(folderToCompare))
{
Expand Down
14 changes: 7 additions & 7 deletions Tests/Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.0.0"/>
<PackageReference Include="xunit" Version="2.4.1"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="xunit" Version="2.8.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="coverlet.collector" Version="3.1.0">
<PackageReference Include="coverlet.collector" Version="6.0.2">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ComicConverter\ComicConverter.csproj"/>
<ProjectReference Include="..\ComicConverter\ComicConverter.csproj" />
</ItemGroup>
</Project>

0 comments on commit b24bd40

Please sign in to comment.