Exemplo n.º 1
0
        public void AddExercises_ShouldReturnTrue()
        {
            var unscramble = _uncrambleTestsFixture.GetFakeUnscramble();
            var exercises  = _uncrambleTestsFixture.GetFakeExercises();

            var result = unscramble.AddExercises(exercises);

            result.Should().BeTrue();
            unscramble.Exercises.Should().BeEquivalentTo(exercises);
        }
Exemplo n.º 2
0
        public async Task CreateAsync_ShouldReturnResultResponseWithSuccess()
        {
            var unscramble = _uncrambleTestsFixture.GetFakeUnscramble();
            var exercises = _uncrambleTestsFixture.GetFakeExercises();

            var result = await _unscrambleService.CreateAsync(unscramble, exercises);

            result.Success.Should().BeTrue();
            unscramble.IsValid().Should().BeTrue();
            _repositoryMock.Verify(mr => mr.CreateAsync(unscramble), Times.Once);
        }