mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 06:27:21 +00:00
Turned getter-like extension methods into extension properties (#1157)
This commit is contained in:
1 parent
0375318b1b
commit
f649febf88
286 files changed
+1379
-1109
No files matched your search
@@ -15,9 +15,9 @@ public sealed class LayoutPurposeTests
|
||||
{
|
||||
foreach (var purpose in Enum.GetValues<LayoutPurpose>())
|
||||
{
|
||||
Assert.That(purpose.Label(), Is.Not.Empty, $"The kind of slide {purpose} has no label.");
|
||||
Assert.That(purpose.Question(), Does.EndWith("?"), $"The kind of slide {purpose} has no question.");
|
||||
Assert.That(purpose.PromptDescription(), Is.Not.Empty.And.Not.EndWith("."), $"The kind of slide {purpose} has no description, or one which ends where the rule for the model goes on.");
|
||||
Assert.That(purpose.Label, Is.Not.Empty, $"The kind of slide {purpose} has no label.");
|
||||
Assert.That(purpose.Question, Does.EndWith("?"), $"The kind of slide {purpose} has no question.");
|
||||
Assert.That(purpose.PromptDescription, Is.Not.Empty.And.Not.EndWith("."), $"The kind of slide {purpose} has no description, or one which ends where the rule for the model goes on.");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ public sealed class LayoutPurposeTests
|
||||
[Test]
|
||||
public void EveryKindOfSlideHasALabelOfItsOwn()
|
||||
{
|
||||
var labels = Enum.GetValues<LayoutPurpose>().Select(purpose => purpose.Label()).ToList();
|
||||
var labels = Enum.GetValues<LayoutPurpose>().Select(purpose => purpose.Label).ToList();
|
||||
Assert.That(labels, Is.Unique);
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public sealed class LayoutPurposeTests
|
||||
[Test]
|
||||
public void TheKindsOfSlidesFollowTheOrderOfTheAreas()
|
||||
{
|
||||
var areas = Enum.GetValues<LayoutPurpose>().Select(purpose => purpose.Area()).ToList();
|
||||
var areas = Enum.GetValues<LayoutPurpose>().Select(purpose => purpose.Area).ToList();
|
||||
using (Assert.EnterMultipleScope())
|
||||
{
|
||||
Assert.That(areas, Is.Ordered, "The kinds of an area stand together, and the areas follow their own order.");
|
||||
|
||||
@@ -433,7 +433,7 @@ public sealed class PresentationTemplateTests
|
||||
(PlaceholderRole.TEXT, 3, StackedHeadings.THIRD_TEXT, 8U),
|
||||
}), "The copies are numbered after the slots of the layout, in reading order.");
|
||||
Assert.That(slide.SlotCopies.Select(copy => copy.Slot.Capacity), Is.EqualTo(new TextCapacity?[] { new TextCapacity(1, 14), new TextCapacity(3, 25), new TextCapacity(1, 18), new TextCapacity(3, 25) }), "A copy holds what its size allows, as a moved slot does.");
|
||||
Assert.That(slide.Slots.Select(slot => $"{slot.Role.CatalogName()} {slot.Ordinal}"), Is.EqualTo(new[] { "title 1", "label 1", "text 1", "label 2", "text 2", "label 3", "text 3" }));
|
||||
Assert.That(slide.Slots.Select(slot => $"{slot.Role.CatalogName} {slot.Ordinal}"), Is.EqualTo(new[] { "title 1", "label 1", "text 1", "label 2", "text 2", "label 3", "text 3" }));
|
||||
Assert.That(slide.Contents.Select(content => (content.Slot.Role, content.Text)), Is.EqualTo(new[]
|
||||
{
|
||||
(PlaceholderRole.TITLE, "Missions"),
|
||||
@@ -500,7 +500,7 @@ public sealed class PresentationTemplateTests
|
||||
using (Assert.EnterMultipleScope())
|
||||
{
|
||||
Assert.That(slide.SlotCopies.Select(copy => (copy.Slot.Ordinal, copy.Slot.Bounds)), Is.EqualTo(new[] { (2, upperRight), (3, lowerRight) }));
|
||||
Assert.That(slide.Slots.Select(slot => $"{slot.Role.CatalogName()} {slot.Ordinal}"), Is.EqualTo(new[] { "title 1", "label 1", "text 2", "text 1", "text 3" }), "The slots of the layout keep their numbers; a copy goes where a reader comes across it.");
|
||||
Assert.That(slide.Slots.Select(slot => $"{slot.Role.CatalogName} {slot.Ordinal}"), Is.EqualTo(new[] { "title 1", "label 1", "text 2", "text 1", "text 3" }), "The slots of the layout keep their numbers; a copy goes where a reader comes across it.");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user