Ejemplo n.º 1
0
        public void SelectMany_ReturnAction_ShouldReturnCorrectResult(IAction <string> action, Func <string, IQuestion <object> > selector)
        {
            // act
            var actual = action.SelectMany(selector);
            // assert
            var expected = new SelectManyActionToQuestion <string, object>(action, selector);

            actual.Should().BeOfType <SelectManyActionToQuestion <string, object> >();
            actual.Should().BeEquivalentTo(expected);
        }
Ejemplo n.º 2
0
        public void Name_ShouldReturnCorrectValue(
            SelectManyActionToQuestion <string, object> sut,
            string expectedName)
        {
            // arrange
            Mock.Get(sut.Action).Setup(q => q.Name).Returns(expectedName);
            // act
            var actual = sut.Name;
            // assert
            var expected = "[SelectMany] " + expectedName;

            actual.Should().Be(expected);
        }