Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 3
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);
        }
Esempio n. 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));
        }
Esempio n. 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>();
 }
Esempio n. 7
0
 public new void Setup()
 {
     _validator = new InstallValidator();
 }
Esempio n. 8
0
 public new void Setup()
 {
     _validator = new InstallValidator();
 }