示例#1
0
        public async Task CheckingExistenceOfMultiples_WillReturnFalse_WhenAnyNotExist(params Guid[] ids)
        {
            // Arrange
            sut = new MoamrathRepository(_db);

            // Act
            bool result = await sut.Exists(ids);

            // Assert
            Assert.False(result);
        }
示例#2
0
        public async Task CheckingExistence_WillReturnFalse_WhenNotExists(int iteration)
        {
            // Arrange
            sut = new MoamrathRepository(_db);

            // Act
            bool result = await sut.Exists(Guid.NewGuid());

            // Assert
            Assert.False(result);
        }
示例#3
0
        public async Task CheckingExistence_WillReturnTrue_WhenExists(string id)
        {
            // Arrange
            sut = new MoamrathRepository(_db);

            // Act
            bool result = await sut.Exists(Guid.Parse(id));

            // Assert
            Assert.True(result);
        }
示例#4
0
        public async Task CheckingExistenceOfMultiples_WillReturnTrue_WhenAllExist(params Guid[] ids)
        {
            // Arrange
            await _db.Database.EnsureDeletedAsync();

            await _db.Database.EnsureCreatedAsync();

            sut = new MoamrathRepository(_db);

            // Act
            bool result = await sut.Exists(ids);

            // Assert
            Assert.True(result);
        }