示例#1
0
            public void Succeed_With_Name()
            {
                var id = new DrinkId(Guid.Parse("83b8710937a84b818c829162c1b405b6"));

                Check.That(id.Guid).IsEqualTo(Guid.Parse("83b8710937a84b818c829162c1b405b6"));
                Check.That(id.ToString()).IsEqualTo("{83B87109-37A8-4B81-8C82-9162C1B405B6}");
                Check.That(id.GetHashCode()).Not.IsEqualTo(0);
                Check.That(id.DebuggerDisplay).IsEqualTo("{83B87109-37A8-4B81-8C82-9162C1B405B6}");
            }
示例#2
0
            public void Succeed_With_DefaultConstructor()
            {
                var id = new DrinkId();

                Check.That(id.Guid).IsEqualTo(Guid.Empty);
                Check.That(id.ToString()).IsEqualTo("{00000000-0000-0000-0000-000000000000}");
                Check.That(id.GetHashCode()).IsEqualTo(0);
                Check.That(id.DebuggerDisplay).IsEqualTo("{00000000-0000-0000-0000-000000000000}");
            }
示例#3
0
            public void ReturnsFormatted_For_CustomGuid()
            {
                var id = new DrinkId(Guid.Parse("83b8710937a84b818c829162c1b405b6"));

                Check.That(id.ToString()).IsEqualTo("{83B87109-37A8-4B81-8C82-9162C1B405B6}");
            }
示例#4
0
            public void ReturnsZeros_For_DefaultConstructor()
            {
                var id = new DrinkId();

                Check.That(id.ToString()).IsEqualTo("{00000000-0000-0000-0000-000000000000}");
            }