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

メール送信サービスをSendGridからAWS SESに変更 #66

Merged
merged 4 commits into from
Jul 14, 2024
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
14 changes: 8 additions & 6 deletions .github/workflows/build_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v3
with:
dotnet-version: 3.1.101
dotnet-version: 7.0
- name: Install dotnet format
run: dotnet tool install -g dotnet-format
- name: format-check
run: dotnet format --check --verbosity q
run: dotnet tool install -g dotnet-format --version 5.1.250801
- name: format-check-whitespace
run: dotnet format whitespace --verify-no-changes --verbosity q
- name: format-check-style
run: dotnet format style --verify-no-changes --verbosity q
- name: Install dependencies
run: dotnet restore
- name: Build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
REG_SUIT_CLIENT_ID: ${{ secrets.REG_SUIT_CLIENT_ID }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: db startup
Expand All @@ -22,7 +22,7 @@ jobs:
- name: app startup
run: docker run -d --name diary_sample_app_1 --network diary-sample_default -p 80:80 diary_sample_app_1
- name: Entity Framework Core CLI Tool install
run: dotnet tool install --global dotnet-ef --version 3.1.8
run: dotnet tool install --global dotnet-ef --version 7.0.11
- name: Install Cypress and run tests
uses: cypress-io/github-action@v2
with:
Expand Down
91 changes: 47 additions & 44 deletions Diary-Sample-Test/Common/CommonUtilTest.cs
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);
}
}
Loading
Loading