-
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.
Startup.csとProgram.csを統合し、ASP.NET Core 6の書き方に修正
global usingを使うように修正 .editorConfigのwhitespace・styleルールでフォーマット
- Loading branch information
Showing
74 changed files
with
3,305 additions
and
3,435 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 |
---|---|---|
@@ -1,50 +1,53 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="CommonUtilTest.cs" company="1-system-group"> | ||
// Copyright (c) 1-system-group. All rights reserved. | ||
// </copyright> | ||
// ----------------------------------------------------------------------- | ||
using Diary_Sample.Common; | ||
using Xunit; | ||
|
||
namespace Diary_Sample_Test.Common | ||
namespace Diary_Sample_Test.Common; | ||
|
||
public class CommonUtilTest | ||
{ | ||
public class CommonUtilTest | ||
public CommonUtilTest() | ||
{ | ||
} | ||
|
||
// 正常系:最小値、最大値 | ||
[Fact] | ||
public void ConvAcceptIdTest001() | ||
{ | ||
int ret1 = CommonUtil.ConvAcceptId("1"); | ||
Assert.Equal(1, ret1); | ||
|
||
int ret2 = CommonUtil.ConvAcceptId("16777215"); | ||
Assert.Equal(16777215, ret2); | ||
} | ||
|
||
// 異常系:null | ||
[Fact] | ||
public void ConvAcceptIdTest002() | ||
{ | ||
public CommonUtilTest() | ||
{ | ||
} | ||
|
||
// 正常系:最小値、最大値 | ||
[Fact] | ||
public void ConvAcceptIdTest001() | ||
{ | ||
int ret1 = CommonUtil.ConvAcceptId("1"); | ||
Assert.Equal(1, ret1); | ||
|
||
int ret2 = CommonUtil.ConvAcceptId("16777215"); | ||
Assert.Equal(16777215, ret2); | ||
} | ||
|
||
// 異常系:null | ||
[Fact] | ||
public void ConvAcceptIdTest002() | ||
{ | ||
int ret = CommonUtil.ConvAcceptId(null); | ||
Assert.Equal(-1, ret); | ||
} | ||
|
||
// 異常系:半角数字以外 | ||
[Fact] | ||
public void ConvAcceptIdTest003() | ||
{ | ||
int ret = CommonUtil.ConvAcceptId("12345"); | ||
Assert.Equal(-1, ret); | ||
} | ||
|
||
// 正常系:範囲外 | ||
[Fact] | ||
public void ConvAcceptIdTest004() | ||
{ | ||
int ret1 = CommonUtil.ConvAcceptId("0"); | ||
Assert.Equal(-1, ret1); | ||
|
||
int ret2 = CommonUtil.ConvAcceptId("16777216"); | ||
Assert.Equal(-1, ret2); | ||
} | ||
int ret = CommonUtil.ConvAcceptId(null); | ||
Assert.Equal(-1, ret); | ||
} | ||
|
||
// 異常系:半角数字以外 | ||
[Fact] | ||
public void ConvAcceptIdTest003() | ||
{ | ||
int ret = CommonUtil.ConvAcceptId("12345"); | ||
Assert.Equal(-1, ret); | ||
} | ||
|
||
// 正常系:範囲外 | ||
[Fact] | ||
public void ConvAcceptIdTest004() | ||
{ | ||
int ret1 = CommonUtil.ConvAcceptId("0"); | ||
Assert.Equal(-1, ret1); | ||
|
||
int ret2 = CommonUtil.ConvAcceptId("16777216"); | ||
Assert.Equal(-1, ret2); | ||
} | ||
} |
Oops, something went wrong.