Esempio n. 1
0
            public void GivenFunction_ReturnsContextWithResult()
            {
                var instance = GherkinFactory.Given(CreateContext, 42);
                var syntax   = (GivenSyntax <int>)instance;

                syntax.Context.Should().Be(42);
            }
Esempio n. 2
0
            public void GivenNull_ThrowsException()
            {
                Func <int, int> createContext = null;

                // ReSharper disable once ExpressionIsAlwaysNull
                var exception =
                    Assert.Throws <ArgumentNullException>(
                        () => GherkinFactory.Given(createContext, 42));

                exception.ParamName.Should().Be("createContext");
            }
Esempio n. 3
0
 public void GivenFunction_ReturnsInstance()
 {
     GherkinFactory.Given(CreateContext, 42).Should().NotBeNull();
 }