public void Save_CallsSave_WhenCalled([NotNull, Frozen] ITestContext context, [NotNull] TestBaseRepository sut) { // Arrange // Act sut.Save(); // Assert context.Received().SaveChanges(); }
public void AddOrUpdate_CallsAdds_ForDayWithDefaultId([NotNull] ITest test, [NotNull, Frozen] ITestContext context, [NotNull] TestBaseRepository sut) { // Arrange test.Id.Returns(0); // Act sut.Save(test); // Assert context.Received().Add(test); }
public void AddOrUpdate_CallsSetStateForSlot_ForExistingDay([NotNull] ITest test, [NotNull, Frozen] ITestContext context, [NotNull] TestBaseRepository sut) { // Arrange test.Id.Returns(1); // Act sut.Save(test); // Assert context.Received().SetStateForSlot(test, EntityState.Modified); }
private void ThenICanStillUseNSubsitute() { _subsitute.Received().Examples = _exampleTable; }