UpdatePath() public method

public UpdatePath ( ) : void
return void
コード例 #1
0
        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");
        }
コード例 #2
0
        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");
        }