public void ResidentInformationIncludesCreatedAt()
        {
            var residentInformation = new ResidentInformation();
            var date = new DateTime(2019, 02, 21);

            residentInformation.DateCreated = date;

            residentInformation.DateCreated.Should().BeSameDateAs(date);
        }
Beispiel #2
0
        public void ViewRecordTests()
        {
            var residentInfo = new ResidentInformation()
            {
                UPRN = 12345
            };

            _mockGetResidentByUprnUseCase.Setup(x => x.Execute(12345)).Returns(residentInfo);
            var response = _classUnderTest.ViewRecord(12345) as OkObjectResult;

            response.Should().NotBeNull();
            response.StatusCode.Should().Be(200);
            response.Value.Should().BeEquivalentTo(residentInfo);
        }
        public void ViewRecordTest()
        {
            var singleResidentInfo = new ResidentInformation()
            {
                FirstName      = "test",
                LastName       = "test",
                DateOfBirth    = "01/01/2020",
                Uprn           = "test",
                HouseReference = "testHouseRef",
                PersonNumber   = 123,
            };

            _mockGetResidentByIdUseCase.Setup(x => x.Execute("testHouseRef", 123)).Returns(singleResidentInfo);
            var response = _classUnderTest.ViewRecord("testHouseRef", 123) as OkObjectResult;

            response.Should().NotBeNull();
            response.StatusCode.Should().Be(200);
            response.Value.Should().BeEquivalentTo(singleResidentInfo);
        }
        public void ResidentInformationIncludesVulnerabilityInformationt()
        {
            var residentInformation = new ResidentInformation();

            residentInformation.HealthConditionOrDisability    = true;
            residentInformation.ReceivesCouncilTaxReduction    = true;
            residentInformation.AdultSocialCareCases           = 1;
            residentInformation.ChildSocialCareCases           = 0;
            residentInformation.LivingInTemporaryAccommodation = false;
            residentInformation.LowIncome          = true;
            residentInformation.ChildWithSEND      = false;
            residentInformation.SingleParent       = false;
            residentInformation.LearningDisability = false;

            residentInformation.HealthConditionOrDisability.Should().BeTrue();
            residentInformation.ReceivesCouncilTaxReduction.Should().BeTrue();
            residentInformation.AdultSocialCareCases.Should().Be(1);
            residentInformation.ChildSocialCareCases.Should().Be(0);
            residentInformation.LivingInTemporaryAccommodation.Should().BeFalse();
            residentInformation.LowIncome.Should().BeTrue();
            residentInformation.ChildWithSEND.Should().BeFalse();
            residentInformation.SingleParent.Should().BeFalse();
            residentInformation.LearningDisability.Should().BeFalse();
        }
        public void ResidentInformationIncludesUPRN()
        {
            var residentInformation = new ResidentInformation();

            residentInformation.UPRN.Should().BeGreaterOrEqualTo(0);
        }
Beispiel #6
0
 public void Setup()
 {
     _fixture = new Fixture();
     _entity  = new ResidentInformation();
 }