public void ctor_WithResult_HasResult() { var r = new FooResult(); _subject = new IdentityAdminResult <FooResult>(r); Assert.AreSame(r, _subject.Result); }
public void ctor_WithResult_HasResult() { var r = new FooResult(); subject = new IdentityManagerResult <FooResult>(r); Assert.AreSame(r, subject.Result); }
public IActionResult GetById(int id) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } var foo = _db.Database.GetCollection <Foo>(ResourceTypes.Foo) .AsQueryable() .FirstOrDefault(x => x.Id == id); if (foo == null) { return(NotFound()); } var result = new FooResult { Id = id, DisplayName = foo.DisplayName, IsBar = foo.IsBar, Value = foo.Value, UserId = foo.UserId, Timestamp = foo.Timestamp }; return(Ok(result)); }
public void ShouldAssertCallWithMockAsArgument() { FooResult result = Mock.Create <FooResult>(); var data = Mock.Create <IDataAccess>(); data.ProcessFilterResult(result, "a", "b"); Mock.Assert(() => data.ProcessFilterResult(result, "a", "b"), Occurs.Once()); }
public void FromCallbackPattern_ExposesResultOfActionOverObservable() { Foo setFoo = new Foo(); Client client = new Client(); FooResult result = ObservableExtensions.FromCallbackPattern(setFoo, (Foo foo, Action <FooResult> fooResult) => client.SimulatedAsync(foo, fooResult)) .First(); Assert.Same(setFoo, result.Foo); }
public void ctor_WithResult_HasResult() { var r = new FooResult(); subject = new IdentityManagerResult<FooResult>(r); Assert.AreSame(r, subject.Result); }
public virtual void UpdateIt(FooResult value) { }
public void ctor_WithResult_HasResult() { var r = new FooResult(); _subject = new IdentityAdminResult<FooResult>(r); Assert.AreSame(r, _subject.Result); }