Beispiel #1
0
        public void ShouldNothave0duration()
        {
            _preProdreportingClient = new ReportingClient(baseUri: "");
            var frameworks = _preProdreportingClient.GetAllApprenticeshipFrameworks();
            var standards  = _preProdreportingClient.GetAllApprenticeshipStandards();

            Assert.Multiple(() =>
            {
                Assert.AreEqual(0, frameworks.Where(x => x.Duration == 0).Count(), string.Join(Environment.NewLine, frameworks.Where(x => x.Duration == 0).Select(y => $"{y.Id} has 0 duration")));
                Assert.AreEqual(0, frameworks.Where(x => x.MaxFunding == 0).Count(), string.Join(Environment.NewLine, frameworks.Where(x => x.MaxFunding == 0).Select(y => $"{y.Id} has 0 funding")));
                Assert.AreEqual(0, standards.Where(x => x.Duration == 0).Count(), string.Join(Environment.NewLine, standards.Where(x => x.Duration == 0).Select(y => $"{y.Id} has 0 duration")));
                Assert.AreEqual(0, standards.Where(x => x.MaxFunding == 0).Count(), string.Join(Environment.NewLine, standards.Where(x => x.MaxFunding == 0).Select(y => $"{y.Id} has 0 funding")));
            });
        }
Beispiel #2
0
        public void ShouldHaveValidOverviewOfRole()
        {
            var message = _reportingClient.GetAllApprenticeshipStandards().Where(x => string.IsNullOrEmpty(x.OverviewOfRole)).Select(y => $"{y.Id} with title {y.Title} has an empty overview {y.OverviewOfRole}");

            Assert.AreEqual(0, message.Count(), string.Join(Environment.NewLine, message));
        }