public void GivenFunction_ReturnsContextWithResult() { var instance = GherkinFactory.Given(CreateContext, 42); var syntax = (GivenSyntax <int>)instance; syntax.Context.Should().Be(42); }
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"); }
public void GivenFunction_ReturnsInstance() { GherkinFactory.Given(CreateContext, 42).Should().NotBeNull(); }