2
// Base test fixture for introspection tests
5
// Sebastien Pouliot <sebastien@xamarin.com>
7
// Copyright 2012-2013 Xamarin Inc.
9
// Licensed under the Apache License, Version 2.0 (the "License");
10
// you may not use this file except in compliance with the License.
11
// You may obtain a copy of the License at
13
// http://www.apache.org/licenses/LICENSE-2.0
15
// Unless required by applicable law or agreed to in writing, software
16
// distributed under the License is distributed on an "AS IS" BASIS,
17
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
// See the License for the specific language governing permissions and
19
// limitations under the License.
23
using System.Reflection;
26
using MonoMac.Foundation;
28
using MonoTouch.Foundation;
31
namespace TouchUnit.Bindings {
33
public abstract class ApiBaseTest {
36
/// Gets or sets a value indicating whether this test fixture will continue after failures.
39
/// <c>true</c> if continue on failure; otherwise, <c>false</c>.
41
public bool ContinueOnFailure { get; set; }
44
/// Gets or sets a value indicating whether this test fixture will log it's progress.
47
/// <c>true</c> if log progress; otherwise, <c>false</c>.
49
public bool LogProgress { get; set; }
51
static protected Type NSObjectType = typeof (NSObject);
53
protected virtual bool Skip (Attribute attribute)
58
protected bool SkipDueToAttribute (MemberInfo member)
63
foreach (Attribute attr in member.GetCustomAttributes (true)) {
72
/// Gets the assembly on which the test fixture will reflect the NSObject-derived types.
73
/// The default implementation returns the assembly where NSObject is defined, e.g.
74
/// monotouch.dll or xammac.dll.
75
/// You need to override this method to return the binding assembly you wish to test.
78
/// The assembly on which the fixture will execute it's tests.
80
protected virtual Assembly Assembly {
81
get { return NSObjectType.Assembly; }