Пример #1
0
        public void T020_EstateSettingsManagerList()
        {
            // Letting estate store generate rows to database for us
            EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID);

            originalSettings.EstateManagers = new UUID[] { MANAGER_ID_1, MANAGER_ID_2 };

            // Saving settings.
            db.StoreEstateSettings(originalSettings);

            // Loading settings to another instance variable.
            EstateSettings loadedSettings = db.LoadEstateSettings(REGION_ID);

            Assert.AreEqual(2, loadedSettings.EstateManagers.Length);
            Assert.AreEqual(MANAGER_ID_1, loadedSettings.EstateManagers[0]);
            Assert.AreEqual(MANAGER_ID_2, loadedSettings.EstateManagers[1]);
        }
Пример #2
0
 public EstateSettings LoadEstateSettings(UUID regionID, bool create)
 {
     return(m_database.LoadEstateSettings(regionID, create));
 }
        public void T012_EstateSettingsRandomStorage()
        {
            TestHelpers.InMethod();

            // Letting estate store generate rows to database for us
            EstateSettings originalSettings = db.LoadEstateSettings(REGION_ID, true);

            new PropertyScrambler <EstateSettings>()
            .DontScramble(x => x.EstateID)
            .Scramble(originalSettings);

            // Saving settings.
            db.StoreEstateSettings(originalSettings);

            // Loading settings to another instance variable.
            EstateSettings loadedSettings = db.LoadEstateSettings(REGION_ID, true);

            // Checking that loaded values are correct.
            Assert.That(loadedSettings, Constraints.PropertyCompareConstraint(originalSettings));
        }