Beispiel #1
0
        public void The_object_should_be_created_with_a_null_argument()
        {
            _instance = FastActivator <ClassWithOneConstructorArg> .Create <string>(null);

            _instance.ShouldNotBeNull();
            _instance.ShouldBeAnInstanceOf <ClassWithOneConstructorArg>();
            _instance.Value.ShouldEqual(default(int));
            _instance.Name.ShouldEqual(null);
        }
Beispiel #2
0
        public void The_object_should_be_created_with_a_null_argument_via_type()
        {
            _instance = (ClassWithOneConstructorArg)FastActivator.Create(typeof(ClassWithOneConstructorArg), new object[] { null });

            _instance.ShouldNotBeNull();
            _instance.ShouldBeAnInstanceOf <ClassWithOneConstructorArg>();
            _instance.Value.ShouldEqual(default(int));
            _instance.Name.ShouldEqual(null);
        }
		public void The_object_should_be_created_with_a_null_argument_via_type()
		{
			_instance = (ClassWithOneConstructorArg)FastActivator.Create(typeof(ClassWithOneConstructorArg), new object[]{null});

			_instance.ShouldNotBeNull();
			_instance.ShouldBeAnInstanceOf<ClassWithOneConstructorArg>();
			_instance.Value.ShouldEqual(default(int));
			_instance.Name.ShouldEqual(null);
		}
		public void The_object_should_be_created_with_a_null_argument()
		{
			_instance = FastActivator<ClassWithOneConstructorArg>.Create<string>(null);

			_instance.ShouldNotBeNull();
			_instance.ShouldBeAnInstanceOf<ClassWithOneConstructorArg>();
			_instance.Value.ShouldEqual(default(int));
			_instance.Name.ShouldEqual(null);
		}
Beispiel #5
0
        public void The_object_should_be_created_with_the_name()
        {
            const string expected = "The Name";

            _instance = FastActivator <ClassWithOneConstructorArg> .Create(expected);

            _instance.ShouldNotBeNull();
            _instance.ShouldBeAnInstanceOf <ClassWithOneConstructorArg>();
            _instance.Value.ShouldEqual(default(int));
            _instance.Name.ShouldEqual(expected);
        }
Beispiel #6
0
        public void The_object_should_be_created()
        {
            const int expected = 47;

            _instance = FastActivator <ClassWithOneConstructorArg> .Create(expected);

            _instance.ShouldNotBeNull();
            _instance.ShouldBeAnInstanceOf <ClassWithOneConstructorArg>();
            _instance.Value.ShouldEqual(expected);
            _instance.Name.ShouldBeNull();
        }
		public void The_object_should_be_created_with_the_name()
		{
			const string expected = "The Name";

			_instance = FastActivator<ClassWithOneConstructorArg>.Create(expected);

			_instance.ShouldNotBeNull();
			_instance.ShouldBeAnInstanceOf<ClassWithOneConstructorArg>();
			_instance.Value.ShouldEqual(default(int));
			_instance.Name.ShouldEqual(expected);
		}
		public void The_object_should_be_created()
		{
			const int expected = 47;

			_instance = FastActivator<ClassWithOneConstructorArg>.Create(expected);

			_instance.ShouldNotBeNull();
			_instance.ShouldBeAnInstanceOf<ClassWithOneConstructorArg>();
			_instance.Value.ShouldEqual(expected);
			_instance.Name.ShouldBeNull();
		}
Beispiel #9
0
        public void The_object_should_be_created_with_the_id()
        {
            Guid expected = CombGuid.Generate();

            _instance = FastActivator <ClassWithOneConstructorArg> .Create(expected);

            _instance.ShouldNotBeNull();
            _instance.ShouldBeAnInstanceOf <ClassWithOneConstructorArg>();
            _instance.Value.ShouldEqual(default(int));
            _instance.Name.ShouldBeNull();
            _instance.Id.ShouldEqual(expected);
        }
		public void The_object_should_be_created_with_the_id()
		{
			Guid expected = CombGuid.Generate();

			_instance = FastActivator<ClassWithOneConstructorArg>.Create(expected);

			_instance.ShouldNotBeNull();
			_instance.ShouldBeAnInstanceOf<ClassWithOneConstructorArg>();
			_instance.Value.ShouldEqual(default(int));
			_instance.Name.ShouldBeNull();
			_instance.Id.ShouldEqual(expected);
		}