-
-
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.
Support custom semantic domains ending in 0 (#3081)
- Loading branch information
1 parent
683ebac
commit 755fbe0
Showing
34 changed files
with
1,138 additions
and
210 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
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 |
---|---|---|
|
@@ -56,11 +56,11 @@ public void TestNotEquals() | |
Assert.That(project.Equals(project2), Is.False); | ||
|
||
project2 = project.Clone(); | ||
project2.AnalysisWritingSystems.Add(new WritingSystem()); | ||
project2.AnalysisWritingSystems.Add(new()); | ||
Assert.That(project.Equals(project2), Is.False); | ||
|
||
project2 = project.Clone(); | ||
project2.SemanticDomains.Add(new SemanticDomain()); | ||
project2.SemanticDomains.Add(new()); | ||
Assert.That(project.Equals(project2), Is.False); | ||
|
||
project2 = project.Clone(); | ||
|
@@ -74,7 +74,7 @@ public void TestNotEquals() | |
Assert.That(project.Equals(project2), Is.False); | ||
|
||
project2 = project.Clone(); | ||
project2.CustomFields.Add(new CustomField()); | ||
project2.CustomFields.Add(new()); | ||
Assert.That(project.Equals(project2), Is.False); | ||
|
||
project2 = project.Clone(); | ||
|
@@ -99,16 +99,27 @@ public void TestNotEquals() | |
[Test] | ||
public void TestClone() | ||
{ | ||
var system = new WritingSystem("en", "WritingSystemName", "calibri"); | ||
var project = new Project { Name = "ProjectName", VernacularWritingSystem = system }; | ||
var domain = new SemanticDomain { Name = "SemanticDomainName", Id = "1" }; | ||
project.SemanticDomains.Add(domain); | ||
|
||
var customField = new CustomField { Name = "CustomFieldName", Type = "type" }; | ||
project.CustomFields.Add(customField); | ||
|
||
var emailInvite = new EmailInvite(10, "[email protected]", Role.Harvester); | ||
project.InviteTokens.Add(emailInvite); | ||
var project = new Project | ||
{ | ||
Id = "ProjectId", | ||
Name = "ProjectName", | ||
IsActive = true, | ||
LiftImported = true, | ||
DefinitionsEnabled = true, | ||
GrammaticalInfoEnabled = true, | ||
AutocompleteSetting = AutocompleteSetting.On, | ||
SemDomWritingSystem = new("fr", "Français"), | ||
VernacularWritingSystem = new("en", "English", "Calibri"), | ||
AnalysisWritingSystems = new() { new("es", "Español") }, | ||
SemanticDomains = new() { new() { Name = "SemanticDomainName", Id = "1" } }, | ||
ValidCharacters = new() { "a", "b", "c" }, | ||
RejectedCharacters = new() { "X", "Y", "Z" }, | ||
CustomFields = new() { new() { Name = "CustomFieldName", Type = "type" } }, | ||
WordFields = new() { "some field string" }, | ||
PartsOfSpeech = new() { "noun", "verb" }, | ||
InviteTokens = new() { new(10, "[email protected]", Role.Harvester) }, | ||
WorkshopSchedule = new() { new(2222, 2, 22), }, | ||
}; | ||
|
||
var project2 = project.Clone(); | ||
Assert.That(project, Is.EqualTo(project2)); | ||
|
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
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.