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);
        }
Пример #3
0
        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);
        }
Пример #4
0
        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();
        }