public void Repository_GetPolicyWithInvalidParam_ReturnsMull() { // Arrange var repository = new JsonRepository(); // Act var sut = repository.GetPolicy(10); // Assert sut.Should().Be(null); }
public void Repository_GetPolicyWithValidParam_ReturnsAValue() { // Arrange var repository = new JsonRepository(); // Act var sut = repository.GetPolicy(1); // Assert sut.Id.Should().Be(1); sut.Firstname.Should().Be("Ian"); sut.Surname.Should().Be("Baker"); }
public void Repository_AddPolicy_ValueIsStored() { // Arrange var repository = new JsonRepository(); var policy = new Policy() { Firstname = "First", Surname = "Surname" }; var index = repository.AddPolicy(policy); // Act var sut = repository.GetPolicy(index); // Assert sut.Firstname.Should().Be("First"); sut.Surname.Should().Be("Surname"); }