Exemplo n.º 1
0
        public void GetFromS3Test()
        {
            Console.Write("Controller Get S3 -> ");
            SillyView view = new SillyView();

            Task <bool> result = view.LoadS3Async("sillywidgets.com", "testdata/testS3.html", Amazon.RegionEndpoint.USWest1);

            result.Wait();

            Assert.True(result.Result);

            Console.WriteLine(view.Render());
        }
Exemplo n.º 2
0
        public void WidgetTest()
        {
            Console.Write("Controller Widget Test -> ");
            SillyController controller = new SillyController();
            SillyView       view       = new SillyView();

            Task <Document> data        = controller.DynamoGetItemAsync(Amazon.RegionEndpoint.USWest1, "sillywidgets", "*****@*****.**");
            Task <bool>     result      = view.LoadS3Async("sillywidgets.com", "diagnostic/diag.html", Amazon.RegionEndpoint.USWest1);
            Task <bool>     bound       = view.BindAsync("content", "sillywidgets.com", "diagnostic/content.html", Amazon.RegionEndpoint.USWest1);
            Task <bool>     widgetBound = view.BindAsync("header", "sillywidgets.com", "diagnostic/header.html", Amazon.RegionEndpoint.USWest1);

            data.Wait();
            result.Wait();
            bound.Wait();
            widgetBound.Wait();

            view.Bind(data.Result);
            view.Bind("dynamoGetValue", "This is a test");

            Console.WriteLine(view.Render());
        }