コード例 #1
0
        public void GetKeyForSpecificity_ReturnsVersionKey_IfVersionSpecificity()
        {
            const string key      = "highanddry";
            string       expected = $"ss/highanddry/{AppHostFixture.ServiceName}/1.0";

            KeyUtilities.GetKeyForSpecificity(key, KeySpecificity.Version).Should().Be(expected);
        }
コード例 #2
0
        public void GetKeyForSpecificity_ReturnsKeyWithPrefix_IfGlobalSpecificity()
        {
            const string key      = "highanddry";
            const string expected = "ss/highanddry";

            KeyUtilities.GetKeyForSpecificity(key, KeySpecificity.Global).Should().Be(expected);
        }
コード例 #3
0
        public void GetKeyForSpecificity_ReturnsInstanceKey_IfInstanceSpecificity()
        {
            const string key      = "highanddry";
            string       expected = $"ss/highanddry/{AppHostFixture.ServiceName}/i/127.0.0.1:8090|api";

            KeyUtilities.GetKeyForSpecificity(key, KeySpecificity.Instance).Should().Be(expected);
        }
コード例 #4
0
        public void GetKeyForSpecificity_ReturnsKey_IfLiteralKeySpecificity()
        {
            const string key = "highanddry";

            KeyUtilities.GetKeyForSpecificity(key, KeySpecificity.LiteralKey).Should().Be(key);
        }