public void TestToString_VersionIsNotSet_Omitted()
        {
            var                name        = "Name" + Guid.NewGuid().ToString("N");
            Func <Object>      initializer = () => new object();
            ServiceDescription target      = new ServiceDescription(name, initializer);

            var result = target.ToString();

            Assert.That(Regex.Matches(result, Regex.Escape(name)), Is.Not.Null.And.Count.EqualTo(1));
        }
        public void TestToString_VersionIsSet_Appeared()
        {
            var                name        = "Name" + Guid.NewGuid().ToString("N");
            Func <Object>      initializer = () => new object();
            var                version     = DateTime.UtcNow.Millisecond;
            ServiceDescription target      =
                new ServiceDescription(name, initializer)
            {
                Version = version
            };

            var result = target.ToString();

            Assert.That(Regex.Matches(result, Regex.Escape(name)), Is.Not.Null.And.Count.EqualTo(1));
            Assert.That(Regex.Matches(result, Regex.Escape(":" + version)), Is.Not.Null.And.Count.EqualTo(1));
        }
		public void TestToString_VersionIsNotSet_Omitted()
		{
			var name = "Name" + Guid.NewGuid().ToString( "N" );
			Func<Object> initializer = () => new object();
			ServiceDescription target = new ServiceDescription( name, initializer );

			var result = target.ToString();

			Assert.That( Regex.Matches( result, Regex.Escape( name ) ), Is.Not.Null.And.Count.EqualTo( 1 ) );
		}
		public void TestToString_VersionIsSet_Appeared()
		{
			var name = "Name" + Guid.NewGuid().ToString( "N" );
			Func<Object> initializer = () => new object();
			var version = DateTime.UtcNow.Millisecond;
			ServiceDescription target =
				new ServiceDescription( name, initializer )
				{
					Version = version
				};

			var result = target.ToString();

			Assert.That( Regex.Matches( result, Regex.Escape( name ) ), Is.Not.Null.And.Count.EqualTo( 1 ) );
			Assert.That( Regex.Matches( result, Regex.Escape( ":" + version ) ), Is.Not.Null.And.Count.EqualTo( 1 ) );
		}