Exemplo n.º 1
0
        public void IsOlderThanClient_SameVersionOrAbove_False(string currentVersion)
        {
            var minimumVersion = "2019.11.0";

            ServerVersionCheck.IsOlderThanClient(currentVersion, SemanticVersion.Parse(minimumVersion))
            .Should().BeFalse();
        }
Exemplo n.º 2
0
        public void IsOlderThanClient_LowerVersion_True(string currentVersion)
        {
            var minimumVersion = "2019.11.0";

            ServerVersionCheck.IsOlderThanClient(currentVersion, SemanticVersion.Parse(minimumVersion))
            .Should().BeTrue();
        }
Exemplo n.º 3
0
        protected void EnsureServerIsMinimumVersion(SemanticVersion requiredVersion, Func <string, string> messageGenerator)
        {
            var currentServerVersion = Repository.LoadRootDocument().Version;

            if (ServerVersionCheck.IsOlderThanClient(currentServerVersion, requiredVersion))
            {
                throw new NotSupportedException(messageGenerator(currentServerVersion));
            }
        }
Exemplo n.º 4
0
 public void IsOlderThanClient_Development_False()
 {
     ServerVersionCheck.IsOlderThanClient("0.0.0-local", SemanticVersion.Parse("2019.11.0"))
     .Should().BeFalse();
 }