Exemple #1
0
        public void TestFailureWhenAssemblyDoesNotExist()
        {
            var controller = new SandboxProtocolController();

            controller.Create("Protocol.dll", this.Meta.ProtocolTypes.FirstOrDefault(type => type.Type == "MyrconTestProtocol8"));

            Assert.IsNull(controller.SandboxedProtocol);
        }
Exemple #2
0
        public void TestFailureReturnsFalse()
        {
            var controller = new SandboxProtocolController();

            var result = controller.Create("Protocol.dll", this.Meta.ProtocolTypes.FirstOrDefault(type => type.Type == "MyrconTestProtocol8"));

            Assert.IsFalse(result);
            Assert.IsNull(controller.SandboxedProtocol);
        }
Exemple #3
0
        public void TestFailureWhenProtocolProviderDoesNotExist()
        {
            var controller = new SandboxProtocolController();

            controller.Create(this.Meta.Assembly.FullName, new ProtocolType() {
                Provider = "Fake",
                Type = "MyrconTestProtocol8"
            });

            Assert.IsNull(controller.SandboxedProtocol);
        }
Exemple #4
0
        public void TestSuccessReturnsTrue()
        {
            var controller = new SandboxProtocolController();

            var result = controller.Create(this.Meta.Assembly.FullName, this.Meta.ProtocolTypes.FirstOrDefault(type => type.Type == "MyrconTestProtocol8"));

            Assert.IsTrue(result);
            Assert.IsNotNull(controller.SandboxedProtocol);
        }