Ejemplo n.º 1
0
  public void MyTestInitialize() 
  {
     gateway = MockRepository.CreateMock<ISharedSpaceGateway>();
     gateway.Expect(g => g.GetSharedSpaces("spaceName", "*****@*****.**"))
           .Return(new SharedSpace()); // whatever you want to return from the fake call
 
          user = new User()
          {
                  Active = true,
                  Name = "Main User",
                  UserID = 1,
                  EmailAddress = "*****@*****.**",
                  OpenID = Guid.NewGuid().ToString()
          };
 
          account = new Account(gateway) // inject the fake object
          {
                  Key1 = "test1",
                  Key2 = "test2",
                  AccountName = "Brief Account Description",
                  ID = 1,
                  Owner = user
          };
  }
Ejemplo n.º 2
0
 public Account(ISharedSpaceGateway sharedSpaceGateway)
 {
     _sharedSpaceGateway = sharedSpaceGateway;
 }