Ejemplo n.º 1
0
        public static IAssertBuilder GetAssertBuilder()
        {
            if (_assertBuilder == null)
            {
                var assemblies = AppDomain.CurrentDomain.GetAssemblies();

                var createBuilderCommand = CreateCommands.FirstOrDefault(command => assemblies.Any(assembly => assembly.GetName().Name == command.AssemblyName));
                if (createBuilderCommand == null)
                {
                    var supportedFrameworks = CreateCommands.Select(command => command.FrameworkName).Distinct();
                    throw new InvalidOperationException(
                              "Unit testing framework not found. Currently supported: "
                              + string.Join(", ", supportedFrameworks));
                }

                _assertBuilder = createBuilderCommand.CreateAssertBuilder();
            }

            return(_assertBuilder);
        }
Ejemplo n.º 2
0
 protected static void Reset()
 {
     _assertBuilder = null;
 }
Ejemplo n.º 3
0
 public Norm(IAssertBuilder assertBuilder)
 {
     this.assertBuilder = assertBuilder;
 }