public void try_the_exception_message()
        {
            var instance = new ConstructorInstance(typeof (GuyWithPrimitives));
            instance.Dependencies.Add("name", "Jeremy");

            var ex =
                Exception<StructureMapBuildPlanException>.ShouldBeThrownBy(
                    () => { instance.ToBuilder(typeof (GuyWithPrimitives), new Policies()); });

            ex.ToString()
                .ShouldContain(
                    "Unable to create a build plan for concrete type StructureMap.Testing.Building.GuyWithPrimitives");

            Debug.WriteLine(ex);
        }
Exemple #2
0
        public void try_the_exception_message()
        {
            var instance = new ConstructorInstance(typeof(GuyWithPrimitives));

            instance.Dependencies.Add("name", "Jeremy");

            var ex = Exception <StructureMapBuildPlanException> .ShouldBeThrownBy(() =>
            {
                instance.ToBuilder(typeof(GuyWithPrimitives), new Policies());
            });

            ex.ToString().ShouldContain("Unable to create a build plan for concrete type StructureMap.Testing.Building.GuyWithPrimitives");

            Debug.WriteLine(ex);
        }