Exemple #1
0
        public new void Setup()
        {
            //set up localziation service used by almost all validators
            _ilService = MockRepository.GenerateMock <IInstallationLocalizationService>();
            _ilService.Expect(l => l.GetResource("")).Return("Invalid").IgnoreArguments();

            _validator = new InstallValidator(_ilService);
        }
Exemple #2
0
        public new void Setup()
        {
            //set up localziation service used by almost all validators
            _ilService = new Mock <IInstallationLocalizationService>();
            _ilService.Setup(l => l.GetResource(It.IsAny <string>())).Returns("Invalid");

            _validator = new InstallValidator(_ilService.Object);
        }
        public new void Setup()
        {
            //set up localziation service used by almost all validators
            _ilService = MockRepository.GenerateMock<IInstallationLocalizationService>();
            _ilService.Expect(l => l.GetResource("")).Return("Invalid").IgnoreArguments();

            _validator = new InstallValidator(_ilService);
        }
Exemple #4
0
        private void TryInstallStanza(string spec_version, string install_stanza)
        {
            // Arrange
            var json = new JObject();

            json["spec_version"] = spec_version;
            json["identifier"]   = "AwesomeMod";
            json["install"]      = new JArray()
            {
                JObject.Parse(install_stanza)
            };

            // Act
            var val = new InstallValidator();

            val.Validate(new Metadata(json));
        }
Exemple #5
0
        private void TryInstallTo(string spec_version, string install_to)
        {
            // Arrange
            var json = new JObject();

            json["spec_version"] = spec_version;
            json["identifier"]   = "AwesomeMod";
            json["install"]      = new JArray()
            {
                new JObject()
                {
                    { "file", "something" },
                    { "install_to", install_to }
                }
            };

            // Act
            var val = new InstallValidator();

            val.Validate(new Metadata(json));
        }
 public void Setup()
 {
     _validator = GetService <InstallValidator>();
 }
 public new void Setup()
 {
     _validator = new InstallValidator();
 }
 public new void Setup()
 {
     _validator = new InstallValidator();
 }