public void ClientIdentifier_FromPath_ServerColonPort() { const string path = "Server:12345"; // Act var identifier = ClientIdentifier.FromPath("Foo", path, Guid.Empty); // Assert Assert.AreEqual("Foo", identifier.Name); Assert.AreEqual("Server", identifier.Server); Assert.AreEqual(12345, identifier.Port); Assert.AreEqual(Guid.Empty, identifier.Guid); }
public void ClientIdentifier_FromPath_FileSystemPath() { const string path = @"\\server\share"; var guid = Guid.NewGuid(); // Act var identifier = ClientIdentifier.FromPath("Bar", path, guid); // Assert Assert.AreEqual("Bar", identifier.Name); Assert.AreEqual(path, identifier.Server); Assert.AreEqual(ClientSettings.NoPort, identifier.Port); Assert.AreEqual(guid, identifier.Guid); }