Esempio n. 1
0
 private void ZeroMembers(DrinkerCycleResponse resp)
 {
     ApiAssertHelper.CheckBaseResponse(resp);
     Assert.IsNotNull(resp.DrinkerCycles);
     Assert.IsTrue(resp.DrinkerCycles.Any(d => d.Name == ApiTestHelper.TestGroup));
     var group = resp.DrinkerCycles.FirstOrDefault(d => d.Name == ApiTestHelper.TestGroup);
     Assert.IsTrue(resp.Drinkers == null || resp.Drinkers.Count(d => d.NonAuthDrinkerCycles.Any(b => b == group.Guid)) == 0);
 }
Esempio n. 2
0
 private void IsNotInGroup(DrinkerCycleResponse resp)
 {
     ApiAssertHelper.CheckBaseResponse(resp);
     Assert.IsNotNull(resp.DrinkerCycles);
     Assert.IsTrue(resp.DrinkerCycles.All(d => d.Name != ApiTestHelper.TestGroup));
 }
 private void CheckForAuthenticated(DrinkerCycleResponse cycles)
 {
     CheckForValidCycles(cycles);
     Assert.IsTrue(cycles.Drinkers[0].NonAuthDrinkerCycles == null || !cycles.Drinkers[0].NonAuthDrinkerCycles.Any());
     Assert.IsTrue(cycles.Drinkers[0].AuthDrinkerCycles.Any(d => d == cycles.DrinkerCycles[0].Guid));
 }
Esempio n. 4
0
 private void IsAuthenticated(DrinkerCycleResponse resp)
 {
     ApiAssertHelper.CheckBaseResponse(resp);
     Assert.IsNotNull(resp.DrinkerCycles);
     Assert.IsTrue(resp.DrinkerCycles.Any(d => d.Name == ApiTestHelper.TestGroup));
     Assert.IsTrue(resp.DrinkerCycles.First(d => d.Name == ApiTestHelper.TestGroup).IsAuthenticated);
 }
        private void CheckForValidCycles(DrinkerCycleResponse cycles)
        {
            ApiAssertHelper.CheckBaseResponse(cycles);
            //check if correct cycle
            Assert.IsTrue(cycles.DrinkerCycles.Count == 1);
            Assert.IsTrue(cycles.DrinkerCycles[0].Name == ApiTestHelper.TestCycleGuid.ToString());

            //check if correct content
            Assert.IsTrue(cycles.DrinkerCycles[0].IsAuthenticated);
            Assert.IsTrue(cycles.Drinkers != null && cycles.Drinkers.Any());
        }