public void SetCorrectlyInstallerOperation() { var installer = new Mock <IInstaller <IPackage> >(); var package = new Mock <IPackage>(); var installCommand = new InstallCommandFake(installer.Object, package.Object); Assert.AreEqual(InstallerOperation.Install, installCommand.InstallerFake.Operation); }
public void SetCorrectlyPackage_WhenValueIsValid() { var installer = new Mock <IInstaller <IPackage> >(); var package = new Mock <IPackage>(); var installCommand = new InstallCommandFake(installer.Object, package.Object); Assert.AreEqual(package.Object, installCommand.PackageFake); }
public void GetPackage_WhenValueIsValid() { var installer = new Mock <IInstaller <IPackage> >(); var package = new Mock <IPackage>(); var installCommand = new InstallCommandFake(installer.Object, package.Object); var testPackage = installCommand.PackageFake; Assert.AreEqual(testPackage, installCommand.PackageFake); }
public void TestForCallingThePerformOperationFromTheInstaller() { var installer = new Mock <IInstaller <IPackage> >(); var package = new Mock <IPackage>(); var installCommand = new InstallCommandFake(installer.Object, package.Object); installer.Setup(x => x.Operation).Returns(InstallerOperation.Install); installer.Verify(); }