Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        public void Should_Return_Name(string name)
        {
            // Given, When
            TestFixture builder = new TestFixtureBuilder().WithName(name);

            // Then
            builder.Name.Should().BeEquivalentTo(name);
        }
Exemplo n.º 4
0
        public void Should_Return_Count(int count)
        {
            // Given, When
            TestFixture builder = new TestFixtureBuilder().WithCount(count);

            // Then
            builder.Count.Should().Be(count);
        }
Exemplo n.º 5
0
        public void Should_Add_Value_To_List()
        {
            // Given, When
            TestFixture builder = new TestFixtureBuilder().WithTest("testing");

            // Then
            builder.Tests.Should().BeEquivalentTo(new[] { "testing" });
        }
Exemplo n.º 6
0
        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 });
        }
Exemplo n.º 7
0
        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);
        }
Exemplo n.º 8
0
 /// <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();