Skip to content

Commit 48b9a43

Browse files
committed
Fixed issue with default identifiers
The `FakeRepository` was updated to assign `Id`s to the `Root:Web` and its children, in order to support the `LayoutController_Menu` test. This disrupted the `ITopicRepositoryTest_SaveTest` test. To mitigate this, the latter was updated to test the `Id`s of the `Root:Configuration` instead (which retains the default values of `-1`).
1 parent f4051f5 commit 48b9a43

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

Ignia.Topics.Tests/ITopicRepositoryTest.cs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,17 @@ public void ITopicRepository_SaveTest() {
8080
var web = _topicRepository.Load("Root:Web");
8181
var configuration = _topicRepository.Load("Root:Configuration");
8282

83-
Assert.AreEqual<int>(-1, web.Id);
83+
Assert.AreEqual<int>(10000, web.Id);
8484
Assert.AreEqual<int>(-1, configuration.Id);
8585

86-
_topicRepository.Save(web);
86+
_topicRepository.Save(configuration);
8787

88-
Assert.AreNotEqual<int>(-1, web.Id);
89-
Assert.AreEqual<int>(-1, web.Children.First().Id);
88+
Assert.AreNotEqual<int>(-1, configuration.Id);
89+
Assert.AreEqual<int>(-1, configuration.Children.First().Id);
9090

91-
_topicRepository.Save(web, true);
91+
_topicRepository.Save(configuration, true);
9292

93-
Assert.AreNotEqual<int>(-1, web.Children.First().Id);
94-
Assert.AreEqual<int>(-1, configuration.Id);
93+
Assert.AreNotEqual<int>(-1, configuration.Children.First().Id);
9594

9695
}
9796

0 commit comments

Comments
 (0)