コード例 #1
0
        public void TestRemoveService_Null_JustFail()
        {
            Type serviceType = null;

            var target = new DefaultServiceTypeLocator();

            var result = target.RemoveService(serviceType);

            Assert.That(result, Is.False);
        }
コード例 #2
0
        public void TestRemoveService_Empty_Fail()
        {
            var serviceType = typeof(Service);

            var target = new DefaultServiceTypeLocator();

            var result = target.RemoveService(serviceType);

            Assert.That(result, Is.False);
            Assert.That(target.EnumerateServices().Count(), Is.EqualTo(0));
        }
コード例 #3
0
        public void TestRemoveService_Registerd_Success()
        {
            var serviceType = typeof(Service);

            var target = new DefaultServiceTypeLocator();

            target.AddService(serviceType);
            var result = target.RemoveService(serviceType);

            Assert.That(result, Is.True);
            Assert.That(target.EnumerateServices().Count(), Is.EqualTo(0));
        }
コード例 #4
0
        public void TestRemoveService_SpecifyNonServiceType_JustFail()
        {
            var serviceType = typeof(Service);

            var target = new DefaultServiceTypeLocator();

            target.AddService(serviceType);
            var result = target.RemoveService(typeof(object));

            Assert.That(result, Is.False);
            Assert.That(target.EnumerateServices().Count(), Is.EqualTo(1));
        }
コード例 #5
0
		public void TestRemoveService_Registerd_Success()
		{
			var serviceType = typeof( Service );

			var target = new DefaultServiceTypeLocator();

			target.AddService( serviceType );
			var result = target.RemoveService( serviceType );

			Assert.That( result, Is.True );
			Assert.That( target.EnumerateServices().Count(), Is.EqualTo( 0 ) );
		}
コード例 #6
0
		public void TestRemoveService_Null_JustFail()
		{
			Type serviceType = null;

			var target = new DefaultServiceTypeLocator();

			var result = target.RemoveService( serviceType );

			Assert.That( result, Is.False );
		}
コード例 #7
0
		public void TestRemoveService_Empty_Fail()
		{
			var serviceType = typeof( Service );

			var target = new DefaultServiceTypeLocator();

			var result = target.RemoveService( serviceType );

			Assert.That( result, Is.False );
			Assert.That( target.EnumerateServices().Count(), Is.EqualTo( 0 ) );
		}
コード例 #8
0
		public void TestRemoveService_SpecifyNonServiceType_JustFail()
		{
			var serviceType = typeof( Service );

			var target = new DefaultServiceTypeLocator();

			target.AddService( serviceType );
			var result = target.RemoveService( typeof( object ) );

			Assert.That( result, Is.False );
			Assert.That( target.EnumerateServices().Count(), Is.EqualTo( 1 ) );
		}