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); } }
public RdcStats Stats() { using (var rdcVersionChecker = new RdcVersionChecker()) { var rdcVersion = rdcVersionChecker.GetRdcVersion(); return new RdcStats { CurrentVersion = rdcVersion.CurrentVersion, MinimumCompatibleAppVersion = rdcVersion.MinimumCompatibleAppVersion }; } }
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); } }
private bool IsRemoteRdcCompatible(RdcStats destinationServerRdcStats) { using (var versionChecker = new RdcVersionChecker()) { var localRdcVersion = versionChecker.GetRdcVersion(); return destinationServerRdcStats.CurrentVersion >= localRdcVersion.MinimumCompatibleAppVersion; } }