public void AddAssetToProjectTest() { // Arrange var project = new ProjectMother().Build(); var asset = new AssetMother().Build(); var originalCount = project.GetAssets().Count(); var expectedId = asset.Id; var expectedCount = 1; // Act project.AddAsset(asset); var actualAsset = project.GetAsset(asset.Id); var actualId = actualAsset.Id; var actualCount = project.GetAssets().Count(); // Assert Assert.AreEqual(expectedId, actualId); Assert.AreEqual(expectedCount, actualCount); Assert.AreNotEqual(originalCount, actualCount); }
public void RemoveAssetFromProjectTest() { // Arrange var project = new ProjectMother().Build(); var asset = new AssetMother().Build(); project.AddAsset(asset); var originalCount = project.GetAssets().Count(); var expected = 0; // Act project.RemoveAsset(asset.Id); var actual = project.GetAssets().Count(); // Assert Assert.AreEqual(expected, actual); Assert.AreNotEqual(originalCount, actual); }