public void BuildDefectQueryReturnsNullWithNullProjectName()
        {
            // Arrange
            string projectName = null;

            _mockAssetType.Expect(x => x.GetAttributeDefinition(null)).IgnoreArguments().Return(null).Repeat.Any();

            // Act
            _v1QueryBuilder = new V1QueryBuilder(_mockAssetType);
            var response = _v1QueryBuilder.BuildDefectQuery(projectName);

            // Assert
            Assert.IsNull(response);
            _mockAssetType.VerifyAllExpectations();
        }
Exemplo n.º 2
0
        public void MapDefectAssetToAssetDtoReturnsValidResponse()
        {
            // Arrange
            //Oid oid = new Oid(_mockAssetType, 1, null);
            Asset asset = new Asset(_mockAssetType);

            _mockAssetType.Expect(x => x.GetAttributeDefinition(null)).IgnoreArguments().Return(null).Repeat.Any();
            // Act
            _v1AssetToAssetDtoMapper = new V1AssetToAssetDtoMapper(_mockAssetType, asset);
            var response = _v1AssetToAssetDtoMapper.MapDefectAssetToAssetDto();

            // Assert
            Assert.IsNotNull(response);
            _mockAssetType.VerifyAllExpectations();
        }