コード例 #1
0
        protected override void OnArrange()
        {
            TestConfig          = Test <Configuration> .Item;
            TestConfig.Mappings = new List <BoardMapping> {
                TestConfig.Mappings[0]
            };
            MockConfigurationProvider.Setup(x => x.GetConfiguration()).Returns(TestConfig);
            MockLeanKitClientFactory.Setup(x => x.Create(It.IsAny <LeanKitAccountAuth>())).Returns(LeanKitApi);
            var testSettings = Test <AppSettings> .Item;

            MockLocalStorage.Setup(x => x.Load()).Returns(testSettings);
            TestItem = new TestTarget(SubscriptionManager, ConfigurationProvider, LocalStorage,
                                      LeanKitClientFactory);
            TestCard = Test <CloneableCard> .Item;
            TestConfig.Mappings[0].Identity.LeanKit = BoardId;
        }
コード例 #2
0
 protected override void OnArrange()
 {
     MockConfigurationProvider.Setup(x => x.GetConfiguration()).Returns(TestConfig);
     MockLeanKitClientFactory.Setup(x => x.Create(It.IsAny <ILeanKitAccountAuth>())).Returns(LeanKitApi);
 }
コード例 #3
0
 public void It_should_not_attempt_to_connect_to_leankit()
 {
     MockLeanKitClientFactory.Verify(x => x.Create(It.IsAny <LeanKitAccountAuth>()), Times.Never());
 }
コード例 #4
0
 protected override void OnArrange()
 {
     MockConfigurationProvider.Setup(x => x.GetConfiguration()).Returns(TestConfig);
     MockLeanKitClientFactory.Setup(x => x.Create(It.IsAny <LeanKitAccountAuth>())).Returns(LeanKitApi);
     MockRestClient.Setup(x => x.Execute(It.IsAny <IRestRequest>())).Returns((IRestResponse)null);
 }
コード例 #5
0
        public void It_should_use_configured_credentials_for_leankit()
        {
            var likeness = TestAuth.AsSource().OfLikeness <LeanKitAccountAuth>();

            MockLeanKitClientFactory.Verify(x => x.Create(It.Is <LeanKitAccountAuth>(auth => likeness.Equals(auth))));
        }