public override bool Equals(object obj) { Poco2 x = obj as Poco2; if (x == null) { return(false); } return(x.IntProp == this.IntProp && x.StringProp == this.StringProp); }
public async Task SaveAndLoadTwoObjectsOfDifferentTypesUsingTheSameHandle() { var poco = new Poco() { IntProp = 1, StringProp = "one" }; var poco2 = new Poco2() { IntProp = 2, StringProp = "two" }; var osh = new ObjectStorageHelper <Poco>(StorageType.Local); var osh2 = new ObjectStorageHelper <Poco2>(StorageType.Local); await osh.SaveAsync(poco, handle); await osh2.SaveAsync(poco2, handle); var result = await osh.LoadAsync(handle); var result2 = await osh2.LoadAsync(handle); Assert.AreEqual(poco, result); Assert.AreEqual(poco2, result2); }