Package com.saasovation.agilepm.domain.model.product

Examples of com.saasovation.agilepm.domain.model.product.ProductId


        TenantId tenantId = new TenantId("T12345");

        Product product =
                new Product(
                        tenantId,
                        new ProductId("679890"),
                        new ProductOwnerId(tenantId, "thepm"),
                        "My Product",
                        "My product, which is my product.",
                        DiscussionAvailability.NOT_REQUESTED);
View Full Code Here


        TenantId tenantId = new TenantId("T12345");

        Product product =
                new Product(
                        tenantId,
                        new ProductId("679890"),
                        new ProductOwnerId(tenantId, "thepm"),
                        "My Product",
                        "My product, which is my product.",
                        DiscussionAvailability.NOT_REQUESTED);
View Full Code Here

        TenantId tenantId = new TenantId("T12345");

        Product product1 =
                new Product(
                        tenantId,
                        new ProductId("679890"),
                        new ProductOwnerId(tenantId, "thepm"),
                        "My Product 1",
                        "My product 1, which is my product.",
                        DiscussionAvailability.NOT_REQUESTED);

        Product product2 =
                new Product(
                        tenantId,
                        new ProductId("09876"),
                        new ProductOwnerId(tenantId, "thepm"),
                        "My Product 2",
                        "My product 2, which is my product.",
                        DiscussionAvailability.NOT_REQUESTED);
View Full Code Here

        TenantId tenantId = new TenantId("T12345");

        Product product1 =
                new Product(
                        tenantId,
                        new ProductId("679890"),
                        new ProductOwnerId(tenantId, "thepm"),
                        "My Product 1",
                        "My product 1, which is my product.",
                        DiscussionAvailability.NOT_REQUESTED);

        Product product2 =
                new Product(
                        tenantId,
                        new ProductId("09876"),
                        new ProductOwnerId(tenantId, "thepm"),
                        "My Product 2",
                        "My product 2, which is my product.",
                        DiscussionAvailability.NOT_REQUESTED);

        Product product3 =
                new Product(
                        tenantId,
                        new ProductId("100200300"),
                        new ProductOwnerId(tenantId, "thepm"),
                        "My Product 3",
                        "My product 3, which is my product.",
                        DiscussionAvailability.NOT_REQUESTED);
View Full Code Here

        final TenantId tenantId = new TenantId("T12345");

        Product product1 =
                new Product(
                        tenantId,
                        new ProductId("679890"),
                        new ProductOwnerId(tenantId, "thepm"),
                        "My Product 1",
                        "My product 1, which is my product.",
                        DiscussionAvailability.NOT_REQUESTED);

        LevelDBUnitOfWork.start(database);
        productRepository.save(product1);

        new Thread() {
           @Override
           public void run() {
               Product product2 =
                       new Product(
                               tenantId,
                               new ProductId("09876"),
                               new ProductOwnerId(tenantId, "thepm"),
                               "My Product 2",
                               "My product 2, which is my product.",
                               DiscussionAvailability.NOT_REQUESTED);
View Full Code Here

        super();
    }

    public void testSave() throws Exception {
        Release release = new Release(
                new TenantId("12345"), new ProductId("p00000"), new ReleaseId("r11111"),
                "release1", "My release 1.", new Date(), new Date());

        LevelDBUnitOfWork.start(this.database);
        releaseRepository.save(release);
        LevelDBUnitOfWork.current().commit();
View Full Code Here

        assertEquals(1, savedReleases.size());
    }

    public void testRemove() {
        Release release1 = new Release(
                new TenantId("12345"), new ProductId("p00000"), new ReleaseId("r11111"),
                "release1", "My release 1.", new Date(), new Date());

        Release release2 = new Release(
                new TenantId("12345"), new ProductId("p00000"), new ReleaseId("r11112"),
                "release2", "My release 2.", new Date(), new Date());

        LevelDBUnitOfWork.start(this.database);
        releaseRepository.save(release1);
        releaseRepository.save(release2);
        LevelDBUnitOfWork.current().commit();

        LevelDBUnitOfWork.start(this.database);
        releaseRepository.remove(release1);
        LevelDBUnitOfWork.current().commit();

        TenantId tenantId = release2.tenantId();
        ProductId productId = release2.productId();

        Collection<Release> savedReleases = releaseRepository.allProductReleases(tenantId, productId);
        assertFalse(savedReleases.isEmpty());
        assertEquals(1, savedReleases.size());
        assertEquals(release2.name(), savedReleases.iterator().next().name());
View Full Code Here

        assertTrue(savedReleases.isEmpty());
    }

    public void testSaveAllRemoveAll() throws Exception {
        Release release1 = new Release(
                new TenantId("12345"), new ProductId("p00000"), new ReleaseId("r11111"),
                "release1", "My release 1.", new Date(), new Date());

        Release release2 = new Release(
                new TenantId("12345"), new ProductId("p00000"), new ReleaseId("r11112"),
                "release2", "My release 2.", new Date(), new Date());

        Release release3 = new Release(
                new TenantId("12345"), new ProductId("p00000"), new ReleaseId("r11113"),
                "release3", "My release 3.", new Date(), new Date());

        LevelDBUnitOfWork.start(this.database);
        releaseRepository.saveAll(Arrays.asList(new Release[] { release1, release2, release3 }));
        LevelDBUnitOfWork.current().commit();

        TenantId tenantId = release1.tenantId();
        ProductId productId = release1.productId();

        Collection<Release> savedReleases = releaseRepository.allProductReleases(tenantId, productId);
        assertFalse(savedReleases.isEmpty());
        assertEquals(3, savedReleases.size());
View Full Code Here

    public void testConcurrentTransactions() throws Exception {
        final List<Integer> orderOfCommits = new ArrayList<Integer>();

        Release release1 = new Release(
                new TenantId("12345"), new ProductId("p00000"), new ReleaseId("r11111"),
                "release1", "My release 1.", new Date(), new Date());

        LevelDBUnitOfWork.start(database);
        releaseRepository.save(release1);

        new Thread() {
           @Override
           public void run() {
               Release release2 = new Release(
                       new TenantId("12345"), new ProductId("p00000"), new ReleaseId("r11112"),
                       "release2", "My release 2.", new Date(), new Date());

               LevelDBUnitOfWork.start(database);
               releaseRepository.save(release2);
               LevelDBUnitOfWork.current().commit();
View Full Code Here

        super();
    }

    public void testSave() throws Exception {
        Sprint sprint = new Sprint(
                new TenantId("12345"), new ProductId("p00000"), new SprintId("s11111"),
                "sprint1", "My sprint 1.", new Date(), new Date());

        LevelDBUnitOfWork.start(this.database);
        sprintRepository.save(sprint);
        LevelDBUnitOfWork.current().commit();
View Full Code Here

TOP

Related Classes of com.saasovation.agilepm.domain.model.product.ProductId

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.