public void GetValue_Return()
        {
            // Arrange
            DllHW d = new DllHW();

            // Act
            var result = d.GetValue();

            // Assert
            // if the return value is Hello World then it's passed
            Assert.AreEqual("Hello World", result);
        }
Exemple #2
0
        static void Main(string[] args)
        {
            DllHW  dll   = new DllHW();
            string value = dll.GetValue();

            if (Convert.ToBoolean(ConfigurationManager.AppSettings["WriteToDatabase"]))
            {
                HelloWorldUseAPI hwuapi = new HelloWorldUseAPI();
                hwuapi.DisplayValue(value);
            }
            else
            {
                HelloWorld hw = new HelloWorld();
                hw.DisplayValue(value);
            }
        }
Exemple #3
0
        static void Main(string[] args)
        {
            DllHW  dll   = new DllHW();
            string value = dll.GetValue();

            if (Convert.ToBoolean(ConfigurationManager.AppSettings["WriteToDatabase"]))
            {
                // display value and also save the value into database table
                HelloWorldUseAPI hwuapi = new HelloWorldUseAPI();
                hwuapi.DisplayValue(value);
            }
            else
            {
                // only display value on screen
                HelloWorld hw = new HelloWorld();
                hw.DisplayValue(value);
            }
        }