コード例 #1
0
 public void VersionCanBeChangedByUserToSpecifyVersionOfTheirApplication()
 {
     var tags = new Dictionary<string, string>();
     var component = new ComponentContext(tags);
     component.Version = "4.2";
     Assert.Equal("4.2", component.Version);
 }
コード例 #2
0
        public void VersionSetsCorrectTagKeyAndValue()
        {
            IDictionary<string, string> tags = new Dictionary<string, string>();
            var component = new ComponentContext(tags);

            string componentVersion = "fakeVersion";
            component.Version = componentVersion;

            Assert.True(tags.Contains(new KeyValuePair<string, string>(ContextTagKeys.Keys.ApplicationVersion, componentVersion)));
        }
コード例 #3
0
 internal void CopyTo(ComponentContext target)
 {
     Tags.CopyTagValue(this.Version, ref target.version);
 }
コード例 #4
0
 public void VersionIsNullByDefaultToAvoidSendingItToEndpointUnnecessarily()
 {
     var tags = new Dictionary<string, string>();
     var component = new ComponentContext(tags);
     Assert.Null(component.Version);
 }
        public void VersionIsNullByDefaultToAvoidSendingItToEndpointUnnecessarily()
        {
            var component = new ComponentContext();

            Assert.IsNull(component.Version);
        }