public void setup()
 {
     numbers = new List <int>();
     factory    = new ContextFactory();
     newContext = factory.CreateContextFrom(new top_of_hierarchy.inner());
     newContext.EstablishContext();
 }
 public void setup()
 {
     factory    = new ContextFactory();
     newContext = factory.CreateContextFrom(
         new generic_container <int> .nested_generic_context <string> .
         nested_nested_generic
         <bool>());
 }
Beispiel #3
0
        public override void BeforeEachTest()
        {
            Type           type    = typeof(ContextWithThrowingSpecification);
            FieldInfo      field   = type.GetInstanceFieldsOfType(typeof(It)).First();
            ContextFactory factory = new ContextFactory();
            var            context = factory.CreateContextFrom(new ContextWithThrowingSpecification());

            specification = Target.CreateSpecification(context, field);
        }
Beispiel #4
0
        public override void BeforeEachTest()
        {
            Type           type    = typeof(ContextWithSingleSpecification);
            FieldInfo      field   = type.GetInstanceFieldsOfUsage(DelegateUsage.Assert).First();
            ContextFactory factory = new ContextFactory();
            var            context = factory.CreateContextFrom(new ContextWithSingleSpecification());

            specification = Target.CreateSpecification(context, field);
        }
        public override void BeforeEachTest()
        {
            Type           type    = typeof(ContextWithThrowingSpecification);
            FieldInfo      field   = type.GetInstanceFieldsOfUsage(new AssertDelegateAttributeFullName()).First();
            ContextFactory factory = new ContextFactory();
            var            context = factory.CreateContextFrom(new ContextWithThrowingSpecification());

            specification = Target.CreateSpecification(context, field);
        }
 public void should_be_able_to_create_the_context_even_though_the_enclosing_class_is_generic()
 {
     newContext = factory.CreateContextFrom(new generic_container <int> .nested_generic_context <string>());
     Assert.NotNull(newContext);
 }