public async Task rejects_invalid_payload() { var infoFactory = TestHelper.StObjMap.StObjs.Obtain <IPocoFactory <IGuestActorInfo> >(); var allower = new GuestActorDirectLoginAllower(infoFactory); var allowed = await allower.AllowAsync(null, TestHelper.Monitor, "Guest", null); allowed.Should().BeFalse(); }
public async Task resolves_successfully() { var infoFactory = TestHelper.StObjMap.StObjs.Obtain <IPocoFactory <IGuestActorInfo> >(); var allower = new GuestActorDirectLoginAllower(infoFactory); var payload = infoFactory.Create(info => info.Token = $"3712.{Guid.NewGuid().ToString()}"); var allowed = await allower.AllowAsync(null, TestHelper.Monitor, "Guest", payload); allowed.Should().BeTrue(); }