Ignore:
Timestamp:
04/28/20 12:56:50 (5 years ago)
Author:
bart
Message:

Release 1.4.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/test/java/geniusweb/profilesserver/AutoUpdatingProfilesFactoryTest.java

    r8 r12  
    222222        }
    223223
     224        @Test
     225        public void saveProfileTest() throws IOException {
     226                assertEquals(0, changes.size());
     227                LinearAdditiveUtilitySpace profile = (LinearAdditiveUtilitySpace) factory
     228                                .getProfile(JOB1);
     229                Profile newprofile = new LinearAdditiveUtilitySpace(profile.getDomain(),
     230                                "jobsA", profile.getUtilities(), profile.getWeights(),
     231                                profile.getReservationBid());
     232                factory.putProfile(newprofile);
     233                // check response immediately
     234                assertEquals(1, changes.size());
     235                assertTrue(changes.get(0) instanceof ProfileChangeEvent);
     236                // check file was written
     237                assertTrue(copyrepodir.resolve("jobs/jobsA.json").toFile().exists());
     238        }
     239
    224240        /**
    225241         * We remove jobs domain.
Note: See TracChangeset for help on using the changeset viewer.