From 42b2cb5660a4267198c52079bafe4a1370bb1641 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20B=C3=B6rchers?= Date: Sun, 14 Jun 2020 22:20:33 +0200 Subject: [PATCH] minor bugfix --- Identity.cs | 2 +- TestProject1/UnitTest1.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Identity.cs b/Identity.cs index ea9deb4..81e950b 100644 --- a/Identity.cs +++ b/Identity.cs @@ -31,7 +31,7 @@ namespace Benchmark private static bool TryGetPrefix(in string identity, ref int lastPosition, out string prefix) { prefix = identity.Remove(lastPosition + 1); - if (prefix.Length <= 3) return false; + if (prefix.Length < 3) return false; return !prefix.Any(character => character < 'A' || character > 'Z'); } diff --git a/TestProject1/UnitTest1.cs b/TestProject1/UnitTest1.cs index 692ccf1..3f6ea76 100644 --- a/TestProject1/UnitTest1.cs +++ b/TestProject1/UnitTest1.cs @@ -61,9 +61,9 @@ namespace TestProject1 [Test] public void Test9() { - Assert.IsTrue(Identity.TryParse("WPR0001023-12", out var actual)); + Assert.IsTrue(Identity.TryParse("WPR1000023-12", out var actual)); Assert.AreEqual("WPR", actual.Prefix); - Assert.AreEqual(1023, actual.Index); + Assert.AreEqual(1000023, actual.Index); Assert.AreEqual(12, actual.Revision); }