-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from pkuehnel/fix/gridpowerFloat
Fix/gridpower float
- Loading branch information
Showing
2 changed files
with
47 additions
and
8 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using Xunit; | ||
using Xunit.Abstractions; | ||
|
||
namespace SmartTeslaAmpSetter.Tests.Services; | ||
|
||
public class GridService : TestBase | ||
{ | ||
public GridService(ITestOutputHelper outputHelper) | ||
: base(outputHelper) | ||
{ | ||
} | ||
|
||
[Theory] | ||
[InlineData("384.8746")] | ||
[InlineData("384")] | ||
[InlineData("384.0")] | ||
[InlineData("384.147")] | ||
public void Can_extract_Integers_From_String(string value) | ||
{ | ||
var gridService = Mock.Create<Server.Services.GridService>(); | ||
var intValue = gridService.GetIntegerFromString(value); | ||
|
||
Assert.Equal(384, intValue); | ||
} | ||
|
||
} |
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