Exemple #1
0
        public void Enrich_WithAPrefix_AddsPrefixToKey()
        {
            var assembly = Reflect.OnTypes.GetAssembly(typeof(AssemblyInfoEnricherTests));
            var sut      = new AssemblyInfoEnricher(assembly, "p_");
            var message  = new Ok("app_name", "some_key");

            sut.Enrich(message);
            Assert.True(message.Meta.ContainsKey("p_Product"));
            Assert.Equal("YesSensu.Enrichers.Tests", message.Meta["p_Product"]);
        }
Exemple #2
0
        public void Enrich_FromCurrentAssebmly_ProductIsYesSensuEnrichersTests()
        {
            var assembly = Reflect.OnTypes.GetAssembly(typeof(AssemblyInfoEnricherTests));
            var sut      = new AssemblyInfoEnricher(assembly);
            var message  = new Ok("app_name", "some_key");

            sut.Enrich(message);
            Assert.True(message.Meta.ContainsKey("Product"));
            Assert.Equal("YesSensu.Enrichers.Tests", message.Meta["Product"]);
        }