-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathVoiceModelIdTest.cs
More file actions
38 lines (33 loc) · 980 Bytes
/
Copy pathVoiceModelIdTest.cs
File metadata and controls
38 lines (33 loc) · 980 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
using System;
using Xunit;
namespace VoicevoxCoreSharp.Core.Tests
{
public class VoiceModelIdTest
{
[Fact]
public void CreateAndConvertToString()
{
var id = new VoiceModelId("test-id");
Assert.Equal("test-id", id.Id);
Assert.Equal("test-id", id.ToString());
// Test implicit conversion to string
string idString = id;
Assert.Equal("test-id", idString);
}
[Fact]
public void CreateFromString()
{
VoiceModelId id = "test-id";
Assert.Equal("test-id", id.Id);
}
[Fact]
public void Equality()
{
var id1 = new VoiceModelId("test-id");
var id2 = new VoiceModelId("test-id");
var id3 = new VoiceModelId("different-id");
Assert.Equal(id1, id2);
Assert.NotEqual(id1, id3);
}
}
}