public UnitTestSettings(BindingMode bindingMode, AssertMode assertMode, bool moduleInit, bool methodInit, bool defaultTestStub) { BindingMode = bindingMode; AssertMode = assertMode; ModuleInit = moduleInit; MethodInit = methodInit; DefaultTestStubInNewModule = defaultTestStub; }
public UnitTestSettings(BindingMode bindingMode, AssertMode assertMode, bool moduleInit, bool methodInit, bool defaultTestStub) { BindingMode = bindingMode; AssertMode = assertMode; ModuleInit = moduleInit; MethodInit = methodInit; DefaultTestStubInNewModule = defaultTestStub; }
public void AssertConfigurationIsValid(AssertMode mode = AssertMode.Full) { using (var writer = new StringWriter()) { var hasErrors = validateConfiguration(writer); if (!hasErrors && mode == AssertMode.Full) { hasErrors = buildAndValidateAll(writer); } if (hasErrors) { throw new ContainerValidationException(writer.ToString(), WhatDoIHave(), WhatDidIScan()); } } }
public void AssertConfigurationIsValid(AssertMode mode = AssertMode.Full) { var writer = new StringWriter(); bool hasErrors = validateConfiguration(writer); if (!hasErrors && mode == AssertMode.Full) { hasErrors = buildAndValidateAll(writer); } if (hasErrors) { writer.WriteLine(); writer.WriteLine(); writer.WriteLine("The known registrations are:"); writer.WriteLine(WhatDoIHave()); throw new ContainerValidationException(writer.ToString()); } }
/// <summary> /// Events the specified event information. /// </summary> /// <param name="eventInfo">Event information.</param> /// <param name="content">Content dictionary.</param> /// <param name="assertMode">Assert mode.</param> public static void Event(Dictionary<string, string> eventInfo, Dictionary<string, string> content, AssertMode assertMode) { Assert.AreEqual(eventInfo["Name"], Helper.GetText(content["Name"])); Assert.AreEqual(eventInfo["ID"], Helper.GetText(content["ID"])); Assert.AreEqual(eventInfo["Points"], Helper.GetText(content["Points"])); if (assertMode == AssertMode.Full) { Assert.AreEqual(eventInfo["Data"], Helper.GetText(content["Data"])); Assert.AreEqual(eventInfo["Text"], Helper.GetText(content["Text"])); } }