public void UpdatePathAndName() { var cm = new ConnectionViewModel(Substitute.For<IConnection>()); // Name is updated to match the host name cm.Path = "server"; cm.Name.Should().Be("server"); cm.Path.Should().Be("server"); // Path is completed to include default scheme and port cm.UpdatePath(); cm.Name.Should().Be("server"); cm.Path.Should().Be("https://server:5444"); }
public void UpdatePathAndNameExtraSpace() { var cm = new ConnectionViewModel(Substitute.For<IConnection>()); // Name doesn't have extra spaces cm.Path = "server "; cm.Name.Should().Be("server"); cm.Path.Should().Be("server "); // Path is completed to include default scheme and port cm.UpdatePath(); cm.Name.Should().Be("server"); cm.Path.Should().Be("https://server:5444"); }