Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 🐛 make unit tests run #12

Merged
merged 5 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ jobs:
run: dotnet restore
- name: Build
run: dotnet build -c Release --no-restore
# - name: Test
# run: dotnet test -c Release
- name: Test
# figure out later why tests are failing on windows
if: matrix.os != 'windows-latest'
run: dotnet test -c Release
- name: Pack
if: matrix.os == 'ubuntu-latest'
run: dotnet pack -v normal -c Release --no-restore --include-symbols --include-source -p:PackageVersion=0.0.0 $PROJECT_NAME/$PROJECT_NAME.csproj
Expand Down
2 changes: 1 addition & 1 deletion Demo/Demo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion DotNetFreeSwitch/DotNetFreeSwitch.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<RootNamespace>DotNetFreeSwitch</RootNamespace>
<TargetFrameworks>net6.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<AssemblyName>DotNetFreeSwitch</AssemblyName>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageVersion>0.0.1</PackageVersion>
Expand Down
12 changes: 6 additions & 6 deletions Test/Integration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{
public void Dispose() { _event = null; }

private string _event;

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (windows-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

The field 'Integration._event' is assigned but its value is never used

Check warning on line 22 in Test/Integration.cs

View workflow job for this annotation

GitHub Actions / build (macos-latest)

The field 'Integration._event' is assigned but its value is never used

public class DefaultInboundSession : InboundSession
{
Expand All @@ -38,7 +38,7 @@
}


[Fact]
[Fact(Skip = "intgegration")]
public async void ConnectToFreeSwitchTest()
{
var address = "127.0.0.1";
Expand All @@ -64,7 +64,7 @@



[Fact]
[Fact(Skip = "intgegration")]
public void FreeSwitchCommandEncodingTest()
{
var authentication = new AuthCommand("ClueCon");
Expand Down Expand Up @@ -107,7 +107,7 @@



[Fact]
[Fact(Skip = "intgegration")]
public async void SendApiTest()
{
const string address = "127.0.0.1";
Expand All @@ -126,7 +126,7 @@
response.Response);
}

[Fact]
[Fact(Skip = "intgegration")]
public async void SendBgApiTest()
{
const string address = "127.0.0.1";
Expand All @@ -144,7 +144,7 @@
Assert.True(jobId != Guid.Empty);
}

[Fact]
[Fact(Skip = "intgegration")]
public async void SendCommandTest()
{
const string address = "127.0.0.1";
Expand All @@ -163,7 +163,7 @@
Assert.True(reply.IsOk);
}

[Fact]
[Fact(Skip = "intgegration")]
public async void SubscribeToEventsTest()
{
const string address = "127.0.0.1";
Expand Down
2 changes: 1 addition & 1 deletion Test/Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<IsPackable>false</IsPackable>

<TargetFrameworks>net6.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Test/Parser.cs → Test/TestParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace Test
{
public class Parser : IDisposable
public class TestParser : IDisposable
{
[Fact]
public void BackgroundJobEventParserTest()
Expand Down
Loading