public void ObjectsShouldBeRoundtrippable() { new TestScheduler().With(sched => { string path; var input = new UserObject() {Bio = "A totally cool cat!", Name = "octocat", Blog = "http://www.github.com"}; UserObject result; using (Utility.WithEmptyDirectory(out path)) { using (var fixture = new TPersistentBlobCache(path)) { fixture.InsertObject("key", input); } sched.Start(); using (var fixture = new TPersistentBlobCache(path)) { var action = fixture.GetObjectAsync<UserObject>("key"); sched.Start(); result = action.First(); } } Assert.Equal(input.Blog, result.Blog); Assert.Equal(input.Bio, result.Bio); Assert.Equal(input.Name, result.Name); }); }
public UserModel(UserObject user) { }