public MSpecTestAdapter(MSpecTestAdapterFactory adapterFactory)
        {
            // check if a version of visual studio that supports traits is running
            vsObjectModel = AppDomain.CurrentDomain.GetAssemblies().Where(x => x.FullName.StartsWith(VSObjectModelAssemblyName)).SingleOrDefault();
            if (vsObjectModel != null)
            {
                FileVersionInfo fileInfo = FileVersionInfo.GetVersionInfo(vsObjectModel.Location);
                if (fileInfo.ProductBuildPart > 50727)
                {
                    UseTraits = true;
                }
            }

            if (adapterFactory == null)
            {
                this.adapterFactory = new MSpecTestAdapterFactory();
                return;
            }

            this.adapterFactory = adapterFactory;
        }
        public MSpecTestAdapter(MSpecTestAdapterFactory adapterFactory)
        {
            // check if a version of visual studio that supports traits is running
            vsObjectModel = AppDomain.CurrentDomain.GetAssemblies().Where(x => x.FullName.StartsWith(VSObjectModelAssemblyName)).SingleOrDefault();
            if (vsObjectModel != null)
            {
                FileVersionInfo fileInfo = FileVersionInfo.GetVersionInfo(vsObjectModel.Location);
                if (fileInfo.ProductBuildPart > 50727)
                {
                    UseTraits = true;
                }
            }

            if (adapterFactory == null)
            {
                this.adapterFactory = new MSpecTestAdapterFactory();
                return;
            }

            this.adapterFactory = adapterFactory;
        }