public static Blobber CreateBlobber() { BlobberRepository repository = new BlobberRepository(); repository.StartEdit(); Blobber b = repository.Create(); b.BlobberId = BLOBBER_ID; IFeatureLayer layer = new FeatureLayerClass(); layer.Name = BLOBBER_VALUE_1; IPropertySet properties = new PropertySetClass(); properties.SetProperty("VALUE1", BLOBBER_VALUE_1); properties.SetProperty("VALUE2", BLOBBER_VALUE_2); properties.SetProperty("VALUE3", BLOBBER_VALUE_3); b.Properties = properties; b.Store(); repository.StopEdit(true); return(b); }
public void BlobberCreateBlobberTest() { Blobber b = CreateBlobber(); Assert.AreEqual(BLOBBER_ID, b.BlobberId); Assert.IsInstanceOfType(b.Properties, typeof(IPropertySet)); IPropertySet persistedProperties = b.Properties; Assert.AreEqual(3, persistedProperties.Count); Assert.AreEqual(BLOBBER_VALUE_1, persistedProperties.GetProperty("VALUE1").ToString()); Assert.AreEqual(BLOBBER_VALUE_2, persistedProperties.GetProperty("VALUE2").ToString()); Assert.AreEqual(BLOBBER_VALUE_3, Convert.ToInt32(persistedProperties.GetProperty("VALUE3"))); }
public static int CreateAndGetOID() { BlobberRepository repository = new BlobberRepository(); repository.StartEdit(); Blobber b = repository.Create(); b.BlobberId = BLOBBER_ID; IPropertySet properties = new PropertySetClass(); properties.SetProperty("VALUE1", BLOBBER_VALUE_1); properties.SetProperty("VALUE2", BLOBBER_VALUE_2); properties.SetProperty("VALUE3", BLOBBER_VALUE_3); b.Properties = properties; b.Store(); repository.StopEdit(true); return(b.ObjectId); }