本文整理汇总了C#中IAssert类的典型用法代码示例。如果您正苦于以下问题:C# IAssert类的具体用法?C# IAssert怎么用?C# IAssert使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IAssert类属于命名空间,在下文中一共展示了IAssert类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Execute
public override void Execute(IAssert assert)
{
var data = SetUp();
var typesToTest = GetTypesToTest(data);
if (typesToTest.Length == 0)
{
assert.Inconclusive(
"No types found to apply the convention to. Make sure the Types predicate is correct and that the right assemblies to scan are specified.");
}
var invalidItems = Array.FindAll(typesToTest, t => data.Must(t) == false);
var message = new StringBuilder();
message.AppendLine(data.Description ?? "Invalid types found");
foreach (var invalidType in invalidItems)
{
message.Append('\t');
data.ItemDescription(invalidType, message);
}
if (data.HasApprovedExceptions)
{
Approve(message.ToString());
}
else
{
assert.AreEqual(0, invalidItems.Count(), message.ToString());
}
}
示例2: TestAttributionHandler
public TestAttributionHandler(DeviceUtil deviceUtil, IAssert assert, TargetPlatform targetPlatform)
: base(deviceUtil, assert)
{
TargetPlatform = targetPlatform;
TestActivityPackage.Assert = Assert;
TestActivityPackage.TargetPlatform = TargetPlatform;
}
示例3: CategoryTestA
public CategoryTestA(IAssert assert, ICategorize categorize)
{
_assert = assert;
categorize.Method("Functional", TestMethodA);
categorize.Method("Functional", TestMethodB);
}
示例4: CPlusPlusSWIGBindingGeneratorWorksTest
public CPlusPlusSWIGBindingGeneratorWorksTest(IAssert assert, ICategorize categorize)
: base(assert)
{
_assert = assert;
categorize.Method("CPlusPlusPotentialSWIGInstallation", () => GenerationIsCorrect());
}
示例5: CPlusPlusExternalPlatformReferenceWorksTest
public CPlusPlusExternalPlatformReferenceWorksTest(IAssert assert, ICategorize categorize)
: base(assert)
{
_assert = assert;
categorize.Method("CPlusPlusPotentialSWIGInstallation", () => GenerationIsCorrect());
}
示例6: Init
public static void Init(ILogger logger = null, IAssert assert = null,
TimeoutSettings timeouts = null, IDriver<IWebDriver> driverFactory = null)
{
DriverFactory = driverFactory ?? new WebDriverFactory();
Asserter = assert ?? new WebAssert();
Timeouts = timeouts ?? new WebTimeoutSettings();
Logger = logger ?? new LogAgregator(new NUnitLogger(), new Log4Net());
MapInterfaceToElement.Init(DefaultInterfacesMap);
}
示例7: InitFromProperties
public static void InitFromProperties(ILogger logger = null, IAssert assert = null,
TimeoutSettings timeouts = null, IDriver<IWebDriver> driverFactory = null)
{
Init(logger, assert, timeouts, driverFactory);
JDISettings.InitFromProperties();
FillFromSettings(p => Domain = p, "Domain");
FillFromSettings(p => DriverFactory.DriverPath = p, "DriversFolder");
// FillFromSettings(p => DriverFactory.DriverVersion = p, "DriversVersion");
// fillAction(p->getDriverFactory().getLatestDriver =
// p.toLowerCase().equals("true") || p.toLowerCase().equals("1"), "driver.getLatest");
// fillAction(p->asserter.doScreenshot(p), "screenshot.strategy");
FillFromSettings(p =>
{
p = p.ToLower();
if (p.Equals("soft"))
p = "any,multiple";
if (p.Equals("strict"))
p = "visible,single";
if (p.Split(',').Length != 2) return;
var parameters = p.Split(',').ToList();
if (parameters.Contains("visible") || parameters.Contains("displayed"))
WebDriverFactory.ElementSearchCriteria = el => el.Displayed;
if (parameters.Contains("any") || parameters.Contains("all"))
WebDriverFactory.ElementSearchCriteria = el => el != null;
if (parameters.Contains("single") || parameters.Contains("displayed"))
OnlyOneElementAllowedInSearch = true;
if (parameters.Contains("multiple") || parameters.Contains("displayed"))
OnlyOneElementAllowedInSearch = false;
}, "SearchElementStrategy");
FillFromSettings(p =>
{
string[] split = null;
if (p.Split(',').Length == 2)
split = p.Split(',');
if (p.ToLower().Split('x').Length == 2)
split = p.ToLower().Split('x');
if (split != null)
BrowserSize = new Size(Parse(split[0]), Parse(split[1]));
}, "BrowserSize");
}
示例8: PlatformSpecificXSLTGenerationWorksTest
public PlatformSpecificXSLTGenerationWorksTest(IAssert assert)
: base(assert)
{
_assert = assert;
}
示例9: ModuleInfoGetsUpgradedTest
public ModuleInfoGetsUpgradedTest(IAssert assert)
: base(assert)
{
_assert = assert;
}
示例10: NuGetAndroidDoesNotCrashTest
public NuGetAndroidDoesNotCrashTest(IAssert assert)
: base(assert)
{
_assert = assert;
}
示例11: MacOSPlatformForceAPIXamMacWorksTest
public MacOSPlatformForceAPIXamMacWorksTest(IAssert assert)
: base(assert)
{
_assert = assert;
}
示例12: PathUtilsTests
public PathUtilsTests(IAssert assert)
{
_assert = assert;
}
示例13: BasicSynchronisationWorksTest
public BasicSynchronisationWorksTest(IAssert assert)
: base(assert)
{
}
示例14: ExampleCocos2DXNATest
public ExampleCocos2DXNATest(IAssert assert)
: base(assert)
{
_assert = assert;
}
示例15: IncludeProjectPropertiesWorksTest
public IncludeProjectPropertiesWorksTest(IAssert assert)
: base(assert)
{
_assert = assert;
}