Ejemplo n.º 1
0
        public async Task GetCustomProjectTypesAsync_InvalidUserId()
        {
            // Arrange
            var cxn        = new SqlConnectionWrapperMock();
            var repository = new SqlProjectMetaRepository(cxn.Object);

            // Act
            await repository.GetCustomProjectTypesAsync(2, 0);

            // Assert
        }
Ejemplo n.º 2
0
        public async Task GetCustomProjectTypesAsync_ProjectNotFound()
        {
            // Arrange
            var projectId = 1;
            var userId    = 2;

            SqlProjectMetaRepository.ProjectVersion[] result = { };
            var cxn        = new SqlConnectionWrapperMock();
            var repository = new SqlProjectMetaRepository(cxn.Object);

            cxn.SetupQueryAsync <SqlProjectMetaRepository.ProjectVersion>("GetInstanceProjectById", new Dictionary <string, object> {
                { "projectId", projectId }, { "userId", userId }
            }, result);

            // Act
            await repository.GetCustomProjectTypesAsync(projectId, userId);

            // Assert
        }