From: <gc...@us...> - 2002-11-06 04:04:01
|
Update of /cvsroot/dotnetmock/dotnetmock/DotNetMock.Examples/Dynamic In directory usw-pr-cvs1:/tmp/cvs-serv13357/DotNetMock.Examples/Dynamic Modified Files: DefaultWeatherRandom.cs IWeatherRandom.cs Weather.cs WeatherTest.cs Log Message: Index: DefaultWeatherRandom.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Examples/Dynamic/DefaultWeatherRandom.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DefaultWeatherRandom.cs 30 Oct 2002 04:46:51 -0000 1.1 --- DefaultWeatherRandom.cs 6 Nov 2002 04:03:58 -0000 1.2 *************** *** 3,7 **** namespace DotNetMock.Examples.Dynamic { ! public class DefaultWeatherRandom : WeatherRandom { public const double CHANCE_OF_RAIN = 0.2; --- 3,7 ---- namespace DotNetMock.Examples.Dynamic { ! public class DefaultWeatherRandom : IWeatherRandom { public const double CHANCE_OF_RAIN = 0.2; Index: IWeatherRandom.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Examples/Dynamic/IWeatherRandom.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** IWeatherRandom.cs 30 Oct 2002 04:46:51 -0000 1.1 --- IWeatherRandom.cs 6 Nov 2002 04:03:58 -0000 1.2 *************** *** 3,7 **** namespace DotNetMock.Examples.Dynamic { ! public interface WeatherRandom { bool NextIsRaining(); --- 3,7 ---- namespace DotNetMock.Examples.Dynamic { ! public interface IWeatherRandom { bool NextIsRaining(); Index: Weather.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Examples/Dynamic/Weather.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Weather.cs 30 Oct 2002 04:46:51 -0000 1.1 --- Weather.cs 6 Nov 2002 04:03:58 -0000 1.2 *************** *** 4,12 **** public class Weather { ! private WeatherRandom random; private bool isRaining = false; private double temperature = 0.0; ! public Weather( WeatherRandom random ) { this.random = random; --- 4,12 ---- public class Weather { ! private IWeatherRandom random; private bool isRaining = false; private double temperature = 0.0; ! public Weather( IWeatherRandom random ) { this.random = random; Index: WeatherTest.cs =================================================================== RCS file: /cvsroot/dotnetmock/dotnetmock/DotNetMock.Examples/Dynamic/WeatherTest.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WeatherTest.cs 30 Oct 2002 04:46:51 -0000 1.1 --- WeatherTest.cs 6 Nov 2002 04:03:58 -0000 1.2 *************** *** 15,20 **** public void SetUp() { ! random = new DynamicMock(typeof(WeatherRandom)); ! weather = new Weather((WeatherRandom)random.Object); } --- 15,20 ---- public void SetUp() { ! random = new DynamicMock(typeof(IWeatherRandom)); ! weather = new Weather((IWeatherRandom)random.Object); } *************** *** 67,71 **** { IMock random = new DynamicMock(typeof(System.Random)); ! WeatherRandom weather = new DefaultWeatherRandom((System.Random)random.Object); random.SetValue("NextDouble", 0.0); --- 67,71 ---- { IMock random = new DynamicMock(typeof(System.Random)); ! IWeatherRandom weather = new DefaultWeatherRandom((System.Random)random.Object); random.SetValue("NextDouble", 0.0); *************** *** 83,87 **** { IMock random = new DynamicMock(typeof(System.Random)); ! WeatherRandom weather = new DefaultWeatherRandom((System.Random)random.Object); random.SetValue("NextDouble", 0.0); --- 83,87 ---- { IMock random = new DynamicMock(typeof(System.Random)); ! IWeatherRandom weather = new DefaultWeatherRandom((System.Random)random.Object); random.SetValue("NextDouble", 0.0); |