예제 #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);
        }
예제 #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);
        }
예제 #3
0
        public void Should_Return_Name(string name)
        {
            // Given, When
            TestFixture builder = new TestFixtureBuilder().WithName(name);

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

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

            // Then
            builder.Tests.Should().BeEquivalentTo(new[] { "testing" });
        }
예제 #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 });
        }
예제 #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);
        }
예제 #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();