UpdatePath() 공개 메소드

public UpdatePath ( ) : void
리턴 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");
        }