-
Notifications
You must be signed in to change notification settings - Fork 13
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 #91 from yagizhanNY/Refactoring
Refactoring
- Loading branch information
Showing
169 changed files
with
622 additions
and
1,779 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,10 @@ | ||
#!/bin/bash | ||
|
||
# Navigate to the SiemensIXBlazor_NpmJS directory | ||
cd SiemensIXBlazor/SiemensIXBlazor_NpmJS | ||
|
||
# Run npm install | ||
npm install | ||
|
||
# Run npm build | ||
npm run build |
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,41 @@ | ||
using SiemensIXBlazor.Enums.PushCard; | ||
using SiemensIXBlazor.Helpers; | ||
|
||
namespace SiemensIXBlazor.Tests.Helpers | ||
{ | ||
public class EnumParserTests | ||
{ | ||
[Theory] | ||
[InlineData(PushCardVariant.alarm, "alarm")] | ||
[InlineData(PushCardVariant.insight, "insight")] | ||
public void EnumToString_ShouldReturnCorrectLowercaseString_ForValidEnum(PushCardVariant variant, string expected) | ||
{ | ||
// Act | ||
var result = EnumParser<PushCardVariant>.EnumToString(variant); | ||
|
||
// Assert | ||
Assert.Equal(expected, result); | ||
} | ||
|
||
[Fact] | ||
public void EnumToString_ShouldReturnEmptyString_ForInvalidEnum() | ||
{ | ||
// Arrange | ||
var invalidEnumValue = (PushCardVariant)999; | ||
|
||
// Act & Assert | ||
Assert.Throws<ArgumentException>(() => EnumParser<PushCardVariant>.EnumToString(invalidEnumValue)); | ||
} | ||
|
||
[Fact] | ||
public void EnumToString_ShouldReturnEmptyString_ForNullEnum() | ||
{ | ||
// Arrange | ||
PushCardVariant? nullableEnum = null; | ||
|
||
// Act & Assert | ||
// You need to handle nullable enums outside the method if using EnumParser | ||
Assert.Throws<InvalidOperationException>(() => EnumParser<PushCardVariant>.EnumToString(nullableEnum!.Value)); | ||
} | ||
} | ||
} |
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.