public void HttpsImposter_Constructor_SetsCert()
        {
            var expectedCertValue = "testCert";
            var imposter          = new HttpsImposter(123, null, null, expectedCertValue, false);

            Assert.AreEqual(expectedCertValue, imposter.Cert);
        }
        public void HttpsImposter_Constructor_SetsName()
        {
            const string expectedName = "Service";
            var          imposter     = new HttpsImposter(123, expectedName);

            Assert.AreEqual(expectedName, imposter.Name);
        }
        public void HttpsImposter_Constructor_SetsKey()
        {
            var expectedKeyValue = "testKey";
            var imposter         = new HttpsImposter(123, null, expectedKeyValue, null, false);

            Assert.AreEqual(expectedKeyValue, imposter.Key);
        }
        public void HttpsImposter_Constructor_SetsPort()
        {
            const int port     = 123;
            var       imposter = new HttpsImposter(port, null);

            Assert.AreEqual(port, imposter.Port);
        }
        public void HttpsImposter_AddStub_AddsStubToCollection()
        {
            var imposter = new HttpsImposter(123, null);

            imposter.AddStub();
            Assert.AreEqual(1, imposter.Stubs.Count);
        }
        public void HttpsImposter_Constructor_SetsMutualAuthFalseWhenMissing()
        {
            var imposter = new HttpsImposter(123, null);

            Assert.IsFalse(imposter.MutualAuthRequired);
        }
        public void HttpsImposter_Constructor_SetsMutualAuth()
        {
            var imposter = new HttpsImposter(123, null, null, null, true);

            Assert.IsTrue(imposter.MutualAuthRequired);
        }
        public void HttpsImposter_Constructor_SetsCertAsNullWhenMissing()
        {
            var imposter = new HttpsImposter(123, null);

            Assert.IsNull(imposter.Cert);
        }
        public void HttpsImposter_Constructor_InitializesStubsCollection()
        {
            var imposter = new HttpsImposter(123, null);

            Assert.IsNotNull(imposter.Stubs);
        }
        public void HttpsImposter_Constructor_AllowsNullPort()
        {
            var imposter = new HttpsImposter(null, null);

            Assert.AreEqual(default(int), imposter.Port);
        }
        public void HttpsImposter_Constructor_SetsProtocol()
        {
            var imposter = new HttpsImposter(123, null);

            Assert.AreEqual("https", imposter.Protocol);
        }
        public void Constructor_SetsKeyAsNullWhenMissing()
        {
            var imposter = new HttpsImposter(123, null);

            Assert.IsNull(imposter.Key);
        }
Beispiel #13
0
        public void HttpsImposter_Constructor_SetsDefaultResponse()
        {
            var imposter = new HttpsImposter(123, null, defaultResponse: new HttpResponseFields());

            Assert.IsNotNull(imposter.DefaultResponse);
        }