我有這樣一個說法: validationResults.Select(result => result.Tag).ToList().Should().Contain(ServiceContractRuleKey.MedicalDeclarationNumberRequired "because a validation error should be added that the MedicalD
我想要一個單元測試來驗證以正確順序發生的兩個函數調用。在本例中,第一個函數對文件進行加密並將其保存到文件系統,第二個函數將加密文件發送到第三方處理器(通過FTP)。 我使用NSubstitute作爲模擬框架和FluentAssertions來幫助進行測試驗證。這看起來並不像你可以用NSubstitute開箱即可實現的。 public void SendUploadToProcessor(Strea
我有一個測試,驗證方法的集合輸出。測試的這種變化通過: [TestMethod, TestCategory("BVT")]
public void TheStatusesAreReturned()
{
var expectedUnprocessedStatuses = new List<FileUploadStatus>
{
FileU
我必須考慮到只有共享屬性比較兩個集合。 如果我瞭解丹尼斯對How to combine collection and property assertions using fluent-assertions?的評論,則應該從2.0版開始工作。 我使用這個API: ActualOes.ShouldHave().SharedProperties().EqualTo(expectedOes);
Act