-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added finer time parameters - code refactoring - more stats in witnessed report * refreshed transaction models * added test project * introduced local cache
- Loading branch information
Showing
40 changed files
with
1,110 additions
and
293 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ obj/ | |
/packages/ | ||
riderModule.iml | ||
/_ReSharper.Caches/ | ||
.idea/ | ||
.idea/ | ||
HeliumCat.sln.DotSettings.user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<Nullable>enable</Nullable> | ||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0"/> | ||
<PackageReference Include="xunit" Version="2.4.1"/> | ||
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
<PackageReference Include="coverlet.collector" Version="3.1.0"> | ||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets> | ||
<PrivateAssets>all</PrivateAssets> | ||
</PackageReference> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\HeliumCat\HeliumCat.csproj"/> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
using HeliumCat.Responses; | ||
using Xunit; | ||
|
||
namespace HeliumCat.Test; | ||
|
||
public class HotspotTest | ||
{ | ||
[Fact] | ||
public void LastPocChallenge_IsNullable() | ||
{ | ||
var hotspot = new Hotspot { LastPocChallenge = null }; | ||
Assert.Null(hotspot.LastPocChallenge); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
using CommandLine; | ||
|
||
namespace HeliumCat.CommandOptions; | ||
|
||
public abstract class TimedOption | ||
{ | ||
[Value(0, MetaName = "hotspot name or address", Required = true, HelpText = "hotspot name or address")] | ||
public string Identifier { get; set; } | ||
|
||
[Option("past-m", Default = 10, HelpText = "past n minutes to report", Group = "past")] | ||
public int PastMinutes { get; set; } | ||
|
||
[Option("past-h", HelpText = "past n hours to report", Group = "past")] | ||
public int PastHours { get; set; } | ||
|
||
[Option("past-d", HelpText = "past n days to report", Group = "past")] | ||
public int PastDays { get; set; } | ||
|
||
public override string ToString() | ||
{ | ||
return $"{Identifier}, {GetPastText()}"; | ||
} | ||
|
||
public string GetPastText() | ||
{ | ||
if (PastDays > 0) | ||
{ | ||
return $"past {PastDays} days"; | ||
} | ||
|
||
if (PastHours > 0) | ||
{ | ||
return $"past {PastHours} hours"; | ||
} | ||
|
||
return $"past {PastMinutes} minutes"; | ||
} | ||
|
||
public int GetPastMinutes() | ||
{ | ||
if (PastDays > 0) | ||
{ | ||
return PastDays * 1440; | ||
} | ||
|
||
if (PastHours > 0) | ||
{ | ||
return PastHours * 60; | ||
} | ||
|
||
return PastMinutes; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.