public void Should_Add_Key_Value(string key, string value) { // Given, When TestFixture builder = new TestFixtureBuilder().WithKeyValue(key, value); // Then builder.Variables?[key].Should().BeEquivalentTo(value); }
public void Should_Add_Key_Value_Pair(KeyValuePair <string, string> keyValuePair) { // Given, When TestFixture builder = new TestFixtureBuilder().WithKeyValue(keyValuePair); // Then builder.Variables?[keyValuePair.Key].Should().BeEquivalentTo(keyValuePair.Value); }
public void Should_Return_Name(string name) { // Given, When TestFixture builder = new TestFixtureBuilder().WithName(name); // Then builder.Name.Should().BeEquivalentTo(name); }
public void Should_Return_Count(int count) { // Given, When TestFixture builder = new TestFixtureBuilder().WithCount(count); // Then builder.Count.Should().Be(count); }
public void Should_Add_Value_To_List() { // Given, When TestFixture builder = new TestFixtureBuilder().WithTest("testing"); // Then builder.Tests.Should().BeEquivalentTo(new[] { "testing" }); }
public void Should_Add_Range_To_List(string test1, string test2, string test3) { // Given, When TestFixture builder = new TestFixtureBuilder().WithTests(new[] { test1, test2, test3 }); // Then builder.Tests.Should().BeEquivalentTo(new[] { test1, test2, test3 }); }
public void Should_Add_Dictionary() { // Given, When var dictionary = new Dictionary <string, string> { { "check", "one" }, { "testing", "two" } }; TestFixture builder = new TestFixtureBuilder() .WithDictionary(dictionary); // Then builder.Variables.Should().BeEquivalentTo(dictionary); Assert.Equal(dictionary, builder.Variables); }
/// <summary> /// Performs conversion from <see cref="TestFixtureBuilder"/> to <see cref="TestFixture"/>. /// </summary> /// <param name="builder">The builder.</param> /// <returns>The test fixture.</returns> public static TestFixture ToTestFixture(TestFixtureBuilder builder) => builder.Build();