public void CreateProjectionProcessor_Table__TestMethod()
        {
            EventStreamSettings testObj = new EventStreamSettings();

            testObj.InitialiseEnvironmentStrings();

            var readerObj = testObj.CreateProjectionProcessorForEventStream(new ProjectionAttribute("Bank", "Account", "Instance 123", "Balance"));

            Assert.IsNotNull(readerObj);
        }
        public void CreateWriter_Table__TestMethod()
        {
            EventStreamSettings testObj = new EventStreamSettings();

            testObj.InitialiseEnvironmentStrings();

            var writerObj = testObj.CreateWriterForEventStream(new EventStreamAttribute("Domain Test", "Entity Type Test", "Instance 123"));

            Assert.IsInstanceOfType(writerObj, typeof(TableEventStreamWriter));
        }
示例#3
0
        public static IServiceCollection AddEventStreamSettings(this IServiceCollection services)
        {
            // and the Event Stream Settings singleton
            services.AddSingleton <IEventStreamSettings, EventStreamSettings>(settings => {
                EventStreamSettings ret = new EventStreamSettings();
                ret.LoadFromConfig(context.FunctionAppDirectory);
                return(ret);
            });

            return(services);
        }
        public void ImplementationType_Table__TestMethod()
        {
            string expected = "TABLE";
            string actual   = "Not set";

            EventStreamSettings testObj = new EventStreamSettings();

            testObj.InitialiseEnvironmentStrings();

            actual = testObj.GetBackingImplementationType(new EventStreamAttribute("Domain Test", "Entity Type Test", "Instance 123"));

            Assert.AreEqual(expected, actual);
        }
        public void LoadFrom_Config_TestMethod()
        {
            string expected = "APPENDBLOB";
            string actual   = "Not set";

            EventStreamSettings testObj = new EventStreamSettings();

            testObj.LoadFromConfig();

            actual = testObj.GetBackingImplementationType(new EventStreamAttribute("Domain Test", "Entity Type Test Two", "Instance 123"));

            Assert.AreEqual(expected, actual);
        }
        public void Constructor_TestMethod()
        {
            EventStreamSettings testObj = new EventStreamSettings();

            Assert.IsNotNull(testObj);
        }