/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Workspaces/CoreTest/SolutionTests/ProjectIdTests.cs
39 строк
1 KB
Cyrus Najmabadi
Remove unused usings
22 май 2024, 09:09
22 май 2024, 09:09
a7aa293
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using Xunit; namespace Microsoft.CodeAnalysis.UnitTests; public sealed class ProjectIdTests { [Fact] public void DebugNameNotPartOfIdentity1() { var guid1 = Guid.NewGuid(); // Same guid, so they should be considered the same, regardless of debug name. var id1 = ProjectId.CreateFromSerialized(guid1, "debug1"); var id2 = ProjectId.CreateFromSerialized(guid1, "debug2"); Assert.True(id1.Equals(id2)); Assert.True(id1 == id2); Assert.True(id1.GetHashCode() == id2.GetHashCode()); Assert.True(id1.Checksum == id2.Checksum); } [Fact] public void DebugNameNotPartOfIdentity2() { // Different guid, so they should be considered different, regardless of debug name. var id1 = ProjectId.CreateFromSerialized(Guid.NewGuid(), "debug1"); var id2 = ProjectId.CreateFromSerialized(Guid.NewGuid(), "debug1"); Assert.False(id1.Equals(id2)); Assert.False(id1 == id2); Assert.False(id1.GetHashCode() == id2.GetHashCode()); Assert.False(id1.Checksum == id2.Checksum); } }