public void ExecTestCase_AppliesCorrectNumberOfBindingsMultipleFacettes() { var n = typeof(TestyHarness); TestyHarness.valueSets.Clear(); IOCSetup(); Api.CreateFacette("TestFac", new List <object>() { 1, 2, 3 }); Api.CreateFacette("TestFac2", new List <object>() { 4, 5, 6 }); Api.BeginTestCase(n.AssemblyQualifiedName, null); Api.AddFacette("TestFac", 1, 2); Api.AddFacette("TestFac2", 1, 1); var coll = new AssertCollection(); coll.Push(() => true); Api.CommitTestCaseCode(coll); Api.ExecTestCase(); var res = Api.GetResults(); Assert.AreEqual(18, res.Count); }
/// <summary> /// Creates a new <see cref="ImportAssetsTag"/> instance. /// </summary> /// <param name="url">URL.</param> /// <param name="exportedCharacters">Exported characters.</param> public ImportAssetsTag(string url, Assert[] exportedCharacters) { this.url = url; this.exportedCharacters = new AssertCollection(); this.exportedCharacters.AddRange(exportedCharacters); this._tagCode = (int)TagCodeEnum.ExportAssets; }
public void TestGenericInheritance() { IServiceCollection serviceCollection = new ServiceCollection(); serviceCollection.AddTransientPlugins <TestInterfaces.ITestInterface>("TestAssemblies/GenericTestAssembly/**/*.dll"); System.Collections.Generic.IEnumerable <TestInterfaces.ITestInterface> services = serviceCollection.BuildServiceProvider().GetServices <TestInterfaces.ITestInterface>(); AssertCollection.CollectionHasAny(services, output, t => Assert.Equal(typeof(GenericClass), t.GetType()), t => Assert.Equal(typeof(ControlClass), t.GetType()) ); }
public void TestLoadingFromSeperateFolders() { IServiceCollection serviceCollection = new ServiceCollection(); serviceCollection.AddTransientPlugins <TestInterfaces.ITestInterface>("TestAssemblies/TestAssembly1/**/*.dll", "TestAssemblies/TestAssembly2/**/*.dll"); System.Collections.Generic.IEnumerable <TestInterfaces.ITestInterface> services = serviceCollection.BuildServiceProvider().GetServices <TestInterfaces.ITestInterface>(); AssertCollection.CollectionHasAny(services, output, t => Assert.Equal(typeof(MultiAssemblyPlugin), t.GetType()), t => Assert.Equal(typeof(TestPlugin), t.GetType()), t => Assert.Equal(typeof(AnotherTestPlugin), t.GetType()), t => Assert.Equal(typeof(TestPlugin2), t.GetType())); }
public void ExecTestCase_Throws_NoTestCaseStartedException_IfNoTestCaseWasBegun() { var n = typeof(TestyHarness); IOCSetup(); try { var coll = new AssertCollection(); coll.Push(() => true); Api.CommitTestCaseCode(coll); Api.ExecTestCase(); Assert.Fail("Did not throw execption!"); } catch (NoTestCaseStartedException) { // All good! return; } }
public void ExecTestCase_AppliesBindings() { var n = typeof(TestyHarness); IOCSetup(); Api.CreateFacette("TestFac", new List <object>() { 1, 2, 3 }); Api.BeginTestCase(n.AssemblyQualifiedName, null); Api.AddFacette("TestFac", 1, 1); var coll = new AssertCollection(); coll.Push(() => true); Api.CommitTestCaseCode(coll); Api.ExecTestCase(); Assert.AreEqual(3, TestyHarness.valueSets.Count); }
/// <summary> /// Creates a new <see cref="ExportAssetsTag"/> instance. /// </summary> /// <param name="exportedCharacters">Exported characters.</param> public SymbolClassTag(Assert[] exportedCharacters) { this.exportedCharacters = new AssertCollection(); this.exportedCharacters.AddRange(exportedCharacters); this._tagCode = (int)TagCodeEnum.SymbolClass; }
/// <summary> /// Creates a new <see cref="ExportAssetsTag"/> instance. /// </summary> public SymbolClassTag() { this._tagCode = (int)TagCodeEnum.SymbolClass; exportedCharacters = new AssertCollection(); }
/// <summary> /// Creates a new <see cref="ExportAssetsTag"/> instance. /// </summary> /// <param name="exportedCharacters">Exported characters.</param> public ExportAssetsTag(Assert[] exportedCharacters) { this.exportedCharacters = new AssertCollection(); this.exportedCharacters.AddRange(exportedCharacters); this._tagCode = (int)TagCodeEnum.ExportAssets; }
/// <summary> /// Creates a new <see cref="ExportAssetsTag"/> instance. /// </summary> public ExportAssetsTag() { this._tagCode = (int)TagCodeEnum.ExportAssets; exportedCharacters = new AssertCollection(); }
public void Setup() { theCollection = new AssertCollection(); }