Exemplo n.º 1
0
        public async Task AllTagsInSameProjectAsync_UnknownTag_ShouldReturnFalse()
        {
            using (var context = new PreservationContext(_dbContextOptions, _plantProvider, _eventDispatcher, _currentUserProvider))
            {
                var dut    = new ProjectValidator(context);
                var result = await dut.AllTagsInSameProjectAsync(new List <int> {
                    0
                }, default);

                Assert.IsFalse(result);
            }
        }
Exemplo n.º 2
0
        public async Task AllTagsInSameProjectAsync_TagsInSameProject_ShouldReturnTrue()
        {
            using (var context = new PreservationContext(_dbContextOptions, _plantProvider, _eventDispatcher, _currentUserProvider))
            {
                var dut    = new ProjectValidator(context);
                var result = await dut.AllTagsInSameProjectAsync(new List <int> {
                    _tag1InNotClosedProjectId, _tag2InNotClosedProjectId
                }, default);

                Assert.IsTrue(result);
            }
        }