public void Ctor_and_dispose()
 {
     using (var tested = new RdcVersionChecker())
     {
         Assert.NotNull(tested);
     }
 } 
 public void Should_have_nontrivial_version()
 {
     using (var tested = new RdcVersionChecker())
     {
         var result = tested.GetRdcVersion();
         Assert.True(result.CurrentVersion > 0);
         Assert.True(result.MinimumCompatibleAppVersion > 0);
     }
 }
示例#3
0
		public RdcStats Stats()
		{
			using (var rdcVersionChecker = new RdcVersionChecker())
			{
				var rdcVersion = rdcVersionChecker.GetRdcVersion();
				return new RdcStats
				{
					CurrentVersion = rdcVersion.CurrentVersion,
					MinimumCompatibleAppVersion = rdcVersion.MinimumCompatibleAppVersion
				};
			}
		}
示例#4
0
		public HttpResponseMessage Stats()
		{
			using (var rdcVersionChecker = new RdcVersionChecker())
			{
				var rdcVersion = rdcVersionChecker.GetRdcVersion();

                var stats = new RdcStats
                {
                    CurrentVersion = rdcVersion.CurrentVersion,
                    MinimumCompatibleAppVersion = rdcVersion.MinimumCompatibleAppVersion
                };

                return this.GetMessageWithObject(stats, HttpStatusCode.OK);
			}
		}
示例#5
0
		private bool IsRemoteRdcCompatible(RdcStats destinationServerRdcStats)
		{
			using (var versionChecker = new RdcVersionChecker())
			{
				var localRdcVersion = versionChecker.GetRdcVersion();
				return destinationServerRdcStats.CurrentVersion >= localRdcVersion.MinimumCompatibleAppVersion;
			}
		}