text:
Q: How to write moq unit test umbraco.web.models.rendermode(currentpage) in asp.net mvc controller net mvc controller source code. I want to write moq unit test.
 public class abcController
 {
    [Authorization]
    public ActionResult findme()
    {
        var model = new Umbraco.Web.Models.RenderModel(CurrentPage);
        ViewData["abc"] = Umbraco;
        return View(model);
    }
 }

Now i want to write moq unit test for the above action method.
And added unittest project into my solution.
below my unit test project code
[TestFixture]
public class abcControllerTest
{   private IPublishedContent content;
[SetUp]
    public void SetUp()
    {
        content = Mock.Of<IPublishedContent>();
     }
     [Test]
    public void findme_Test_Success()
    {   var contentMock = Mock.Get(content);
        var abccontroller = new abcController();
        var result= abccontroller.findme() as ViewResult;
        Assert.IsNotNull(result);
    }

}

this is not working for me.. getting object null ref exception
Note: CurrentPage is built in property for IPublishedContent interface of RenderMvcController
Note: Umbraco is a helper class UmbracoHelper of Umbraco dll

redpajama_set_name: RedPajamaStackExchange


TravelCenters of America plans to launch this summer TA Express, with smaller outlets offering quicker in-and-out service from its TA and Petro Stopping Centers.
TA Express is designed to give prospective franchises another option for working with TravelCenters. The company said it would soon announce franchise locations.
TravelCenters seeks to grow beyond its core market of Class 8 trucks into Classes 4-7 that include private, for-hire fleets and small- to medium-size businesses, according to a March investor presentation from the Westlake, Ohio-based company. A typical TravelCenters site includes about 200 parking spots on 26 acres with showers, laundry and other amenities. A smaller site offers about 80 parking spaces on 9 to 13 acres and fewer amenities.
TA Express shops will accept the same fuel programs and payment options as other TA outlets. Professional drivers also will be able to earn and redeem points from TravelCenters' UltraOne program.
TA already operates convenience stores that retail gasoline under the Minit Mart brand, but these generally target consumers, not professional drivers.


This APA essay examines the ways in which humans and nature affect each other. This biology essay explores different ideas from the effects of climate change on human violence to the effects of nature on human health. This paper was written at an undergraduate level as a sample for the Ultius blog.
The relationship between humans and nature is a long and complicated one. In the millions of years that humans and nature have been interacting, there have been many changes to eat that were fueled by the other. Some of these changes have been positive while others have been undeniably negative. Humans have greatly impacted the populations of countless plant and animal species, actually changed the plant cycles for several tree and plant species, and caused an increase in vegetation growth as a result of climate change. Nature has impacted humans in several ways as well. Studies indicate that warm climates can change human behavior, nature has beneficial events on humans' mental health, and can even have positive impacts on human physical health, as well.
Climate change undoubtedly has an effect on human violence. Many researchers have concluded that warmer climates lead to higher rates of violent crime. It is believed that less deviation in seasonal climates can lead to a fast life strategy, less self-control, and a decreased focus on the future (Grabmeier). All of these traits are believed to contribute to violent behavior and aggression. Some feel that warmer temperatures lead to more irritation and discomfort, but this cannot explain the more extreme crimes like murder. Another theory is that when it is warmer, people are more likely to be partaking in activities outside, leading to more interaction with other people, which increases the opportunity for conflict. Still, that does not explain why there is more violence in areas where the average temperature is ninety than in areas where the average temperature is seventy when people in both areas are likely to be outside more.
Recent research suggests that the increase in violence is caused by a combination of hotter temperatures and less seasonal variances in temperature. Experimenters at the University of Ohio explained such temperature patters can have serious effects on the climate. Agricultural planning, food hoarding and preparation, or basic preparations for winter effects and shapes a culture in many ways, including how valuable time and self-control are, though we may not even realize it. (Grabmeier). Because there is less variation in temperature between the seasons, people are more able to do what they want as they do not have to prepare food or firewood or supplies for winter.
In addition, people in warmer climates may experience the stress that comes with parasites, venomous animals, and other risks associated with hot climates. People in warmer climates are therefore more concerned with what is happening right now rather than how their actions will affect them in the future. Researchers also noted the affects this lack of future focus has on other aspects of culture when they stated, "We see evidence of a faster life strategy in hotter climates with less temperature variation- they are less strict about time, they have less use of birth control, they have children earlier and more often" (Grabmeier). Without having to focus on the future, people in these climates often do not develop a strong sense of self-control, which can lead to increased aggression and violent behavior internationally.
The ever-domineering presence of humans has affected countless animal species. Since the end of the last Ice Age, humans have relocated almost one thousand known species and domestication almost five hundred animal species and three hundred plant species (Floorwalker). Many animal species have been forced to adapt. The population explosion surrounding the Industrial Revolution had a huge impact on several animals. While there are some species that undoubtedly suffered, from hunting and fishing for example, other species learned to adapt to the presence of humans and continue to thrive. For example, animals that are common in urban and suburban areas, like pigeons and crows, have adapted quite well. They have changed their feeding habits and food storage patterns to better fit urban living.
A study conducted in Denmark found that almost twenty endangered species of birds were nesting in business parks in urban areas (Floorwalker). This gave birth to the idea that business parks could be designed specifically to encourage birds to nest in them. Their flat, wide rooftops would keep the birds from the hustle and bustle of the streets below and remain relatively quiet at night, providing the optimal environment for such city-dwelling animals.
Another affect that human presence has had on animals is that entirely new species have developed. During World War II, thousands of people were forced into the London Underground when their cities were bombed. They brought some mosquitoes with them. While the dark, underground passageways were completely different from their natural habitat and free of their normal food source, bird blood, there was plenty of human blood for eating and standing water for breeding. After spending seventy years totally isolated from the outside world, they eventually developed their own breeding behavior, feeding habits, and DNA, making it impossible for them to breed successfully with other mosquito species that live above ground (Kaplan). An entirely new species was created solely because of human activity.
Other animal species have been entirely wiped out by human presence. One example of animal species driven to extinction by humans is the passenger pigeon. These birds use to make up almost forty percent of the entire bird population in the United States. Before European settlers arrived, there were an estimated four billion passenger pigeons in North America (Gerken). When settlers cleared countless miles of the birds' habitat, the forests of eastern North America, the pigeons were forced into farmland as a resource for food. They caused severe damage to fields of crops and were often shot by farmers both to protect their crops and for meat. An increase in hunting and trapping during the nineteenth century seriously depleted the passenger pigeon population. The last one died in the Cincinnati Zoo in 1914 (Gerken). This bird species became extinct entirely because of the presence of humans.
There have been several studies that concluded that nature has a positive effect on the mental and physical health of human beings. Researchers for the University of Glasgow organized an observational study in that concluded that being exposed to nature has beneficial effects on human health. The study examined the entire working population in England, excluding those with circulatory disease, lung cancer, and those with a history or self-harm (Mitchell and Popham 1655). The experiment sought to discover if populations living in greener areas experience less income-based health disparity, or the incapability to afford health care and the related rise in health issues. They concluded that lower income populations living in areas with more vegetation experienced lower mortality rates and better health.
In addition to physical health, nature has proven to show benefits to our mental health, as well. The University of Essex found in 2013 that when participants took short nature walks, their clinical depression scores decreased by more than seventy percent (Bushak). In contrast, a control group was tested after walking through a shopping center. Afterwards, their clinical depression scores were only reduced by forty five percent, while more than one fifth of participants reported feeling more depressed (Bushak). Furthermore, research from the University of Southern California fully supports these findings. Teenagers who lived for six months or more within thirty three hundred feet of green space experienced a severe drop in aggressive behavior (Floorwalker). Neighborhoods that were considered to be 'bad' neighborhoods proved to experience a twelve percent decrease in violent and aggressive behavior after an increase in greenery in the area (Floorwalker). These results were consistent regardless of race, education, and income level.
Studies have shown that light pollution from mass amounts of artificial light in urban areas has proven to be upsetting to natural ecosystems. Scientists in the United Kingdom recently conducted an observational experiment charting the relationship between the time local trees produce buds and light pollution. The team observed four separate tree species and found that there is a very good chance that artificial light can cause trees to bud over a week before their counterparts living away from such bright urban areas (Ffrench-Constant et al.). While the theory has yet to be proven, the study certainly suggests that the artificial light has an effect on the trees' budding time.
One of the study's authors stated, "It's correlative, so we can't prove anything. We can just show that there's a correlation," (Ffrench-Constant). If trees really are budding earlier than they normally would, this could lead to a larger effect on the surrounding ecosystem. The artificial light would alter plant cycles, seriously disrupting their bud dormancy, growth patterns, and eventually, their production of leaves and fruit (Ffrench-Constant). It can also change the habitat and feeding patterns of moths, which are drawn to light, bringing their predators with them.
Climate change has had a surprising effect on the growth of vegetation. Melting glaciers and the slow but constant disappearance of ice-shelves have had an auxiliary effect; when the ice disappears, green vegetation and growth appears in its place (Floorwalker). This was discovered by NASA via their satellite imagery. When the ice melts, it releases carbon dioxide into the air; that, coupled with warmer temperature and thus longer growing seasons is an optimal environment for plants to flourish. New research in climate change has statistically attributed this change to human causes (Mooney). These experiments used various sets of climate model runs to determine whether a specific environmental change is more likely to happen in simulations including greenhouse gas emissions from humans than it is in simulations that do not. They found that the simulations with greenhouse gases ended up looking incredibly similar to NASA's satellite images than the simulations without greenhouse gases.
The researchers concluded, "the trend of strengthened northern vegetation greening… can be rigorously attributed, with high statistical confidence, to anthropogenic forcings, particularly to rising atmospheric concentrations of greenhouse gases" (Mooney). This is only one of several recent studies that have proven such a relationship between climate change and a greener northern hemisphere. Many of these studies also suggest that another huge contributing factor to this rather sudden environmental change caused by humans- an increase in nitrogen in the atmosphere.
Because of our unavoidable interaction with each other, humans and nature have had a long, complicated relationship that has had both positive and negative effects on each. Nature has effected humans by improving their mental and physical health but also seems to be able to impact human behavior. On the other side, human have affected millions and millions of plant and animal species, including changing plant cycles and increasing vegetation in areas where the ice caps are rapidly melting. Such an intricate and involved relationship is sure to be complex and dynamic as long as it continues.
Like what you read? Buy an essay from Ultius to delve deep into the topic of your choice.
Bushak, Lecia. "Benefits of Ecotherapy: Being In Nature Fights Depression, Improves Mental Health and Well-Being." Medical Daily. Medical Daily, 26 Oct. 2013. Web. 20 Aug. 2016 .
Ffrench-Constant, Richard H., Robin Somers-Yeates, Jonathon Bennies, Theodoros Economou, David Hodgson, Adrian Spalding, Peter K. McGregor. "Light pollution is associated with earlier tree budburst across the United Kingdom." Proceedings of the Royal Society B, vol. 283, no. 1833, 2016, n.p. Web. .
Floorwalker, Mike. "10 Interesting Effects Humans and Nature Have On Each Other". Listverse. Listverse, 27 Jul. 2016. Web. 20 Aug. 2016. .
Grabmeier, Jess. "Researchers offer new theory on how climate affects violence: Climate impacts life strategies, time orientation, self-control." ScienceDaily. ScienceDaily, 24 June 2016. Web. 18 Aug. 2016. .
Kaplan, Sara. "Humans are driving the evolution of new species- and that could be just as bad as causing extinctions." The Washington Post. The Washington Post, 29 Jun. 2016. Web. 18 Aug. 2016. .
Mitchell, R. and Popham, F. "Effect of exposure to natural environment on health inequalities : an observational population study." The Lancet, vol. 372, no. 9650, 2008, pp. 1655-1660.
Mooney, Chris. "Thanks to climate change, the Arctic is turning green". The Washington Post. The Washing Post, 27 Jun. 2016. Web. 20 Aug. 2016 .
Ultius, Inc. "Sample APA Paper on Humans and Nature." Ultius | Custom Writing and Editing Services. February 02, 2019. http://www.ultius.com/ultius-blog/entry/apa-paper-humans-nature.html.