public void FindById_Returns_Response_For_Known_Id() { // Arrange m_Query.FindById(m_EntityOne.Id).Returns(m_EntityOne); // Act IGameReviewModel actual = m_Sut.FindById(m_EntityOne.Id); // Assert Assert.NotNull(actual); Assert.AreEqual(m_EntityOne.Id, actual.Id); }
public void FindById_ReturnsNull_ForNotExistingId() { // Arrange var repository = Substitute.For <IDaysRepository>(); repository.FindById(-1).Returns(( IDay )null); InformationFinder sut = CreateSut(repository); // Act IDayForResponse actual = sut.FindById(-1); // Assert Assert.Null(actual); }
public void FindById_ReturnsNull_ForNotExistingId() { // Arrange var repository = Substitute.For <ISlotsRepository>(); repository.FindById(IdDoesNotMatter).Returns(( ISlot )null); InformationFinder sut = CreateSut(repository); // Act ISlotForResponse actual = sut.FindById(IdDoesNotMatter); // Assert Assert.Null(actual); }
public void FindById_ReturnsDay_ForExistingId([NotNull] IDay day) { // Arrange var repository = Substitute.For <IDaysRepository>(); repository.FindById(day.Id).Returns(day); InformationFinder sut = CreateSut(repository); // Act IDayForResponse actual = sut.FindById(day.Id); // Assert Assert.Equal(day.Id, actual.Id); }
public void FindById_ReturnsSlot_ForExistingId([NotNull] ISlot slot) { // Arrange var repository = Substitute.For <ISlotsRepository>(); repository.FindById(slot.Id).Returns(slot); InformationFinder sut = CreateSut(repository); // Act ISlotForResponse actual = sut.FindById(slot.Id); // Assert Assert.Equal(slot.Id, actual.Id); }