Junit 将AssertNotSame转换为AssertThat
我希望在我的自动测试中有更直观的断言。我有一个断言来验证是否出现了错误消息,这让人有点头疼Junit 将AssertNotSame转换为AssertThat,junit,assert,Junit,Assert,我希望在我的自动测试中有更直观的断言。我有一个断言来验证是否出现了错误消息,这让人有点头疼 Assert.assertNotSame((ExpectedConditions.textToBePresentInElementLocated(By.className("notification-title"), "Error message")), "Error message"); 有没有关于如何转换的建议?结果比我想象的要简单: 资产((ExpectedConditions.textToBeP
Assert.assertNotSame((ExpectedConditions.textToBePresentInElementLocated(By.className("notification-title"), "Error message")), "Error message");
有没有关于如何转换的建议?结果比我想象的要简单:
资产((ExpectedConditions.textToBePresentElementLocated(By.className(“通知标题”),“错误消息”))是(而不是(“错误消息”))代码>
不一样的错误让我困惑:D