diff options
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockArtifact.java')
-rw-r--r-- | plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockArtifact.java | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockArtifact.java b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockArtifact.java new file mode 100644 index 00000000000..5818d54fb5d --- /dev/null +++ b/plugins/org.eclipse.osee.framework.core.model.test/src/org/eclipse/osee/framework/core/model/mocks/MockArtifact.java @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright (c) 2010 Boeing. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Boeing - initial API and implementation + *******************************************************************************/ +package org.eclipse.osee.framework.core.model.mocks; + +import org.eclipse.osee.framework.core.data.IArtifactType; +import org.eclipse.osee.framework.core.data.IOseeBranch; +import org.eclipse.osee.framework.core.data.NamedIdentity; +import org.eclipse.osee.framework.core.enums.BranchState; +import org.eclipse.osee.framework.core.enums.BranchType; +import org.eclipse.osee.framework.core.model.Branch; +import org.eclipse.osee.framework.core.model.IBasicArtifact; +import org.eclipse.osee.framework.core.model.type.ArtifactType; + +/** + * @author Jeff C. Phillips + */ +public class MockArtifact extends NamedIdentity implements IBasicArtifact<Object> { + + private final Branch branch; + private final ArtifactType artifactType; + private final int artId; + + public MockArtifact(String guid, String name, IOseeBranch branch, IArtifactType artifactType, int artId) { + super(guid, name); + this.branch = new Branch(branch.getGuid(), branch.getName(), BranchType.WORKING, BranchState.MODIFIED, false); + this.artifactType = new ArtifactType(artifactType.getGuid(), artifactType.getName(), false); + this.artId = artId; + } + + @Override + public int getArtId() { + return artId; + } + + @Override + public Branch getBranch() { + return branch; + } + + @Override + public ArtifactType getArtifactType() { + return artifactType; + } + + @Override + public Object getFullArtifact() { + return null; + } + +} |