Example #1
0
 public void ShouldNotBeEquals_ServerName()
 {
     Server one = new Server(3000, "machineEqualNameTets", "serverNotEqualTest");
     Server two = new Server(3000, "machineEqualNameTets", "serverEqualTest");
     Assert.That(!one.Equals(two));
 }
Example #2
0
 public void ShouldGetServerPort()
 {
     Server actual = new Server(3000, "machineNameTest", "serverNameTest");
     Assert.That(actual.ServerPort, new EqualConstraint(3000));
 }
Example #3
0
 public void ShouldGetMachineName()
 {
     Server actual = new Server(3000, "machineNameTest", "serverNameTest");
     Assert.That(actual.MachineName, new EqualConstraint("machineNameTest"));
 }
Example #4
0
 public void ShouldGetDefaultServerPort()
 {
     Server actual = new Server();
     Assert.That(actual.ServerPort, new EqualConstraint(2000));
 }
Example #5
0
 public void ShouldGetDefaultServerName()
 {
     Server actual = new Server();
     Assert.That(actual.ServerName, new EmptyConstraint());
 }
 /// <summary>
 /// Increases the port number for the server by one, so that it corresponds
 /// to the transfer port.
 /// </summary>
 /// <remarks>
 /// 1.3
 /// -- snip --
 ///
 /// Wired communication takes place over a TCP/IP connection using TLS
 /// [1]. The default port is TCP 2000, but other ports can be used. The
 /// transfer port is the default port incremented by one, or 2001 by
 /// default.
 /// </remarks>
 /// <param name="bookmark">The Bookmark to use as base.</param>
 /// <returns>A new Bookmark.</returns>
 private Bookmark MakeTransferBookmark(Bookmark bookmark)
 {
     var server = new Server(bookmark.Server.ServerPort + 1, bookmark.Server.MachineName, bookmark.Server.ServerName);
     return new Bookmark(server, bookmark.UserInformation);
 }