Skip to content

Commit e8a12bd

Browse files
committed
5.0.1 release
1 parent 511e49b commit e8a12bd

File tree

4 files changed

+212
-5
lines changed

4 files changed

+212
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ az deployment group create --template-file ./bicep/main.bicep --resource-group <
7777

7878
|プレースホルダー|置換|
7979
|-|-|
80-
|`{{VITE_FUNCTION_APP_URL}}`|**関数アプリのドメイン名**|
80+
|`{{AZURE_FUNCTION_APP_DOMAIN_NAME}}`|**関数アプリのドメイン名**|
8181
|`{{VITE_TELEMETRY_CONNECTION_STRING}}`|**Application Insights の接続文字列**|
8282

8383
3. `source/server/Karamem0.Commistant.Web` フォルダーに移動します。
@@ -91,7 +91,7 @@ dotnet publish --configuration Release
9191
5. `publish` フォルダーの中身を圧縮します。
9292

9393
```
94-
Compress-Archive -Path ./bin/Release/net8.0/publish/* -DestinationPath ../../build.zip
94+
Compress-Archive -Path ./bin/Release/net10.0/publish/* -DestinationPath ../../build.zip
9595
```
9696

9797
6. Azure CLI で ZIP ファイルをアップロードします。
@@ -113,7 +113,7 @@ dotnet publish --configuration Release
113113
2. `publish` フォルダーの中身を圧縮します。
114114

115115
```
116-
Compress-Archive -Path ./bin/Release/net8.0/publish/* -DestinationPath ../../build.zip
116+
Compress-Archive -Path ./bin/Release/net10.0/publish/* -DestinationPath ../../build.zip
117117
```
118118

119119
3. Azure CLI で ZIP ファイルをアップロードします。
@@ -131,8 +131,8 @@ az webapp deploy --name <関数アプリの名前> --resource-group <リソー
131131
|プレースホルダー|置換|
132132
|-|-|
133133
|`{{AZURE_WEB_APP_DOMAIN_NAME}}`|**Web アプリのドメイン名**|
134-
|`{{MICROSOFT_APP_ID}}`|**アプリケーション ID**|
135-
|`{{MICROSOFT_BOT_ID}}`|**ボット ID**|
134+
|`{{MICROSOFT_TEAMS_APP_ID}}`|**アプリケーション ID**|
135+
|`{{MICROSOFT_365_AGENT_ID}}`|**アプリケーション ID**|
136136

137137
3. `manifest` フォルダーの中身を圧縮します。
138138

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
//
2+
// Copyright (c) 2022-2026 karamem0
3+
//
4+
// This software is released under the MIT License.
5+
//
6+
// https://github.com/karamem0/commistant/blob/main/LICENSE
7+
//
8+
9+
using Karamem0.Commistant.Models;
10+
using Microsoft.Agents.Builder;
11+
using Microsoft.Agents.Builder.State;
12+
using Microsoft.Agents.Core.Models;
13+
using Microsoft.Agents.Storage;
14+
using Microsoft.Extensions.Logging;
15+
using NSubstitute;
16+
using NUnit.Framework;
17+
using System.Text.Json;
18+
19+
namespace Karamem0.Commistant.Routes.Tests;
20+
21+
[Category("Karamem0.Commistant.Routes")]
22+
public class MeetingEndedRouteHandlerTests
23+
{
24+
25+
[Test()]
26+
public async Task InvokeAsync_Success()
27+
{
28+
// Setup
29+
var logger = Substitute.For<ILogger<MeetingEndedRouteHandler>>();
30+
var conversationState = new ConversationState(new MemoryStorage());
31+
var turnContext = Substitute.For<ITurnContext>();
32+
_ = turnContext.Activity.Returns(
33+
new Activity()
34+
{
35+
ChannelId = Channels.Test,
36+
Type = ActivityTypes.Event,
37+
Conversation = new ConversationAccount()
38+
{
39+
Id = "2f6f9ab4-e65f-480e-9e12-d130196afc98",
40+
},
41+
Value = JsonElement.Parse(
42+
"""
43+
{
44+
"id": "1234567890"
45+
}
46+
"""
47+
)
48+
}
49+
);
50+
_ = turnContext.StackState.Returns(new TurnContextStateCollection());
51+
var turnState = Substitute.For<ITurnState>();
52+
// Execute
53+
await conversationState.LoadAsync(turnContext);
54+
conversationState.SetValue(
55+
nameof(CommandSettings),
56+
new CommandSettings()
57+
{
58+
MeetingInProgress = true,
59+
MeetingStartedSended = true,
60+
MeetingEndingSended = true,
61+
ScheduledStartTime = DateTime.Parse("2000-01-01T09:00:00Z"),
62+
ScheduledEndTime = DateTime.Parse("2000-01-01T09:30:00Z")
63+
}
64+
);
65+
var target = new MeetingEndedRouteHandler(conversationState, logger);
66+
await target.InvokeAsync(turnContext, turnState);
67+
// Assert
68+
var actual = conversationState.GetValue<CommandSettings>(nameof(CommandSettings));
69+
using (Assert.EnterMultipleScope())
70+
{
71+
Assert.That(actual.MeetingInProgress, Is.False);
72+
Assert.That(actual.MeetingStartedSended, Is.False);
73+
Assert.That(actual.MeetingEndingSended, Is.False);
74+
Assert.That(actual.ScheduledStartTime, Is.Null);
75+
Assert.That(actual.ScheduledEndTime, Is.Null);
76+
}
77+
}
78+
79+
}
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
//
2+
// Copyright (c) 2022-2026 karamem0
3+
//
4+
// This software is released under the MIT License.
5+
//
6+
// https://github.com/karamem0/commistant/blob/main/LICENSE
7+
//
8+
9+
using Karamem0.Commistant.Models;
10+
using Karamem0.Commistant.Services;
11+
using Microsoft.Agents.Builder;
12+
using Microsoft.Agents.Builder.State;
13+
using Microsoft.Agents.Core.Models;
14+
using Microsoft.Agents.Extensions.Teams.Models;
15+
using Microsoft.Agents.Storage;
16+
using Microsoft.Extensions.Logging;
17+
using NSubstitute;
18+
using NUnit.Framework;
19+
using System.Text.Json;
20+
21+
namespace Karamem0.Commistant.Routes.Tests;
22+
23+
[Category("Karamem0.Commistant.Routes")]
24+
public class MeetingStartedRouteHandlerTests
25+
{
26+
27+
[Test()]
28+
public async Task InvokeAsync_Success()
29+
{
30+
// Setup
31+
var logger = Substitute.For<ILogger<MeetingStartedRouteHandler>>();
32+
var conversationState = new ConversationState(new MemoryStorage());
33+
var meetingService = Substitute.For<IMeetingService>();
34+
_ = meetingService
35+
.GetMeetingInfoAsync(Arg.Any<ITurnContext>(), default)
36+
.Returns(
37+
new MeetingInfo()
38+
{
39+
Details = new MeetingDetails()
40+
{
41+
ScheduledStartTime = DateTime.Parse("2000-01-01T09:00:00Z"),
42+
ScheduledEndTime = DateTime.Parse("2000-01-01T09:30:00Z")
43+
}
44+
}
45+
);
46+
var turnContext = Substitute.For<ITurnContext>();
47+
_ = turnContext.Activity.Returns(
48+
new Activity()
49+
{
50+
ChannelId = Channels.Test,
51+
Type = ActivityTypes.Event,
52+
Conversation = new ConversationAccount()
53+
{
54+
Id = "2f6f9ab4-e65f-480e-9e12-d130196afc98",
55+
},
56+
Value = JsonElement.Parse(
57+
"""
58+
{
59+
"id": "1234567890"
60+
}
61+
"""
62+
)
63+
}
64+
);
65+
_ = turnContext.StackState.Returns(new TurnContextStateCollection());
66+
var turnState = Substitute.For<ITurnState>();
67+
// Execute
68+
await conversationState.LoadAsync(turnContext);
69+
conversationState.SetValue(
70+
nameof(CommandSettings),
71+
new CommandSettings()
72+
{
73+
MeetingInProgress = false,
74+
MeetingStartedSended = false,
75+
MeetingEndingSended = false,
76+
ScheduledStartTime = null,
77+
ScheduledEndTime = null
78+
}
79+
);
80+
var target = new MeetingStartedRouteHandler(
81+
conversationState,
82+
meetingService,
83+
logger
84+
);
85+
await target.InvokeAsync(turnContext, turnState);
86+
// Assert
87+
var actual = conversationState.GetValue<CommandSettings>(nameof(CommandSettings));
88+
using (Assert.EnterMultipleScope())
89+
{
90+
Assert.That(actual.MeetingInProgress, Is.True);
91+
Assert.That(actual.MeetingStartedSended, Is.False);
92+
Assert.That(actual.MeetingEndingSended, Is.False);
93+
Assert.That(actual.ScheduledStartTime, Is.EqualTo(DateTime.Parse("2000-01-01T09:00:00Z")));
94+
Assert.That(actual.ScheduledEndTime, Is.EqualTo(DateTime.Parse("2000-01-01T09:30:00Z")));
95+
}
96+
}
97+
98+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
//
2+
// Copyright (c) 2022-2026 karamem0
3+
//
4+
// This software is released under the MIT License.
5+
//
6+
// https://github.com/karamem0/commistant/blob/main/LICENSE
7+
//
8+
9+
using NUnit.Framework;
10+
using QRCoder;
11+
12+
namespace Karamem0.Commistant.Services.Tests;
13+
14+
[Category("Karamem0.Commistant.Services")]
15+
public class QRCodeServiceTests
16+
{
17+
18+
[Test()]
19+
public async Task CreateAsync_Success()
20+
{
21+
// Setup
22+
var qrCodeGenerator = new QRCodeGenerator();
23+
// Execute
24+
var target = new QRCodeService(qrCodeGenerator);
25+
var actual = target.CreateAsync("Hello, World!");
26+
// Assert
27+
Assert.That(actual, Is.Not.Null);
28+
}
29+
30+
}

0 commit comments

Comments
 (0)