public async Task ReceivePortalChildList_FetchChild() { list = await portal.FetchChild(); Assert.IsTrue(list.FetchChildCalled); Assert.IsTrue(list.Single().FetchChildCalled); }
public async Task ReceivePortalChildList_CreateChild() { list = await portal.CreateChild(); Assert.IsTrue(list.CreateChildCalled); Assert.IsTrue(list.Single().CreateChildCalled); }
public async Task ReceivePortalChildList_FetchIntCriteriaCalled() { int crit = DateTime.Now.Millisecond; list = await portal.FetchChild(crit); Assert.AreEqual(crit, list.IntCriteria); Assert.AreEqual(crit, list.Single().IntCriteria); }
public async Task ReceivePortalChildList_FetchGuidCriteriaCalled() { var crit = Guid.NewGuid(); list = await portal.FetchChild(crit); Assert.AreEqual(crit, list.GuidCriteria); Assert.AreEqual(crit, list.Single().GuidCriteria); }
public async Task ReceivePortalList_CreateIntCriteriaCalled() { int crit = DateTime.Now.Millisecond; list = await portal.Create(crit); Assert.AreEqual(crit, list.IntCriteria); Assert.AreEqual(crit, list.Single().IntCriteria); }
public async Task ReceivePortalList_CreateGuidCriteriaCalled() { var crit = Guid.NewGuid(); list = await portal.Create(crit); Assert.AreEqual(crit, list.GuidCriteria); Assert.AreEqual(crit, list.Single().GuidCriteria); }
public async Task ListBase_CreateAdd() { var mock = scope.Resolve <MockReceivePortalChild <IBaseObject> >(); mock.MockPortal.Setup(x => x.CreateChild()).ReturnsAsync(scope.Resolve <IBaseObject>()); var result = await list.CreateAdd(); Assert.IsTrue(list.Count == 1); Assert.AreSame(result, list.Single()); mock.MockPortal.Verify(x => x.CreateChild(), Times.Once); }