Example #1
0
        public void GetFlagMetadataTest()
        {
            const string functionName    = "flag.metadata";
            var          defaultStrategy = new DefaultStrategy(visitorDelegate);

            var metadata         = new FsFlag.FlagMetadata("CampaignId", "variationGroupId", "variationId", false, "");
            var resultatMetadata = defaultStrategy.GetFlagMetadata(metadata, "key", true);

            Assert.AreEqual(JsonConvert.SerializeObject(metadata), JsonConvert.SerializeObject(resultatMetadata));
            fsLogManagerMock.Verify(x => x.Error(string.Format(Constants.GET_METADATA_CAST_ERROR, "key"), functionName), Times.Never());
        }