Index: Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableAssemblyCreator.cs
===================================================================
diff -u -r0526b2313fd2c2bf90766d83f2a815037d01b9c9 -r0df4def16c2d4e4cb3be9a65fc94422a602d330c
--- Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableAssemblyCreator.cs (.../SerializableAssemblyCreator.cs) (revision 0526b2313fd2c2bf90766d83f2a815037d01b9c9)
+++ Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableAssemblyCreator.cs (.../SerializableAssemblyCreator.cs) (revision 0df4def16c2d4e4cb3be9a65fc94422a602d330c)
@@ -51,7 +51,7 @@
}
var idGenerator = new UniqueIdentifierGenerator();
- string serializableAssemblyId = idGenerator.GetNewId().ToString();
+ string serializableAssemblyId = idGenerator.GetNewId();
return new SerializableAssembly(serializableAssemblyId,
GetLowerCorner(assessmentSection.Geometry),
Index: Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableAssessmentSectionCreator.cs
===================================================================
diff -u -r0526b2313fd2c2bf90766d83f2a815037d01b9c9 -r0df4def16c2d4e4cb3be9a65fc94422a602d330c
--- Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableAssessmentSectionCreator.cs (.../SerializableAssessmentSectionCreator.cs) (revision 0526b2313fd2c2bf90766d83f2a815037d01b9c9)
+++ Ringtoets/Integration/src/Ringtoets.Integration.IO/Creators/SerializableAssessmentSectionCreator.cs (.../SerializableAssessmentSectionCreator.cs) (revision 0df4def16c2d4e4cb3be9a65fc94422a602d330c)
@@ -51,7 +51,7 @@
throw new ArgumentNullException(nameof(idGenerator));
}
- return new SerializableAssessmentSection(idGenerator.GetNewId().ToString(),
+ return new SerializableAssessmentSection(idGenerator.GetNewId(),
assessmentSectionName,
geometry);
}
Index: Ringtoets/Integration/src/Ringtoets.Integration.IO/Helpers/UniqueIdentifierGenerator.cs
===================================================================
diff -u -r77af63e3ae290bffd192ac96059661e15181c775 -r0df4def16c2d4e4cb3be9a65fc94422a602d330c
--- Ringtoets/Integration/src/Ringtoets.Integration.IO/Helpers/UniqueIdentifierGenerator.cs (.../UniqueIdentifierGenerator.cs) (revision 77af63e3ae290bffd192ac96059661e15181c775)
+++ Ringtoets/Integration/src/Ringtoets.Integration.IO/Helpers/UniqueIdentifierGenerator.cs (.../UniqueIdentifierGenerator.cs) (revision 0df4def16c2d4e4cb3be9a65fc94422a602d330c)
@@ -40,9 +40,9 @@
/// Gets a new unique id.
///
/// An unique id.
- public int GetNewId()
+ public string GetNewId()
{
- return currentId++;
+ return $"{currentId++}";
}
}
}
\ No newline at end of file
Index: Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Helpers/UniqueIdentifierGeneratorTest.cs
===================================================================
diff -u -r77af63e3ae290bffd192ac96059661e15181c775 -r0df4def16c2d4e4cb3be9a65fc94422a602d330c
--- Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Helpers/UniqueIdentifierGeneratorTest.cs (.../UniqueIdentifierGeneratorTest.cs) (revision 77af63e3ae290bffd192ac96059661e15181c775)
+++ Ringtoets/Integration/test/Ringtoets.Integration.IO.Test/Helpers/UniqueIdentifierGeneratorTest.cs (.../UniqueIdentifierGeneratorTest.cs) (revision 0df4def16c2d4e4cb3be9a65fc94422a602d330c)
@@ -19,7 +19,6 @@
// Stichting Deltares and remain full property of Stichting Deltares at all times.
// All rights reserved.
-using System.Collections.Generic;
using NUnit.Framework;
using Ringtoets.Integration.IO.Helpers;
@@ -35,24 +34,24 @@
var generator = new UniqueIdentifierGenerator();
// Call
- int id = generator.GetNewId();
+ string id = generator.GetNewId();
// Assert
- Assert.Zero(id);
+ Assert.AreEqual("0", id);
}
[Test]
public void GivenGeneratedId_WhenGetNewIdCalled_ThenNewIdGenerated()
{
// Given
var generator = new UniqueIdentifierGenerator();
- int currentId = generator.GetNewId();
+ string currentId = generator.GetNewId();
// Precondition
- Assert.Zero(currentId);
+ Assert.AreEqual("0", currentId);
// When
- var generatedIds = new List
+ string[] generatedIds =
{
generator.GetNewId(),
generator.GetNewId()
@@ -61,8 +60,8 @@
// Then
CollectionAssert.AreEqual(new[]
{
- 1,
- 2
+ "1",
+ "2"
}, generatedIds);
}
}